netreg-devel: validity.pm.patch Centos 6 install

apg at eecs.wsu.edu apg at eecs.wsu.edu
Tue Mar 20 15:52:56 EDT 2012


Yes, that patch worked also. But, but, but... it temporarirly turns off
'strict refs' instead of fixing the error in the code? 



On Tue, Mar 20, 2012 at 03:28:49PM -0400, Frank Sweetser wrote:
> 
> Thanks, but that patch actually changes what's being tested.  It looks like
> the RHEL6 family includes a more strict version of perl.  Try this one instead
> - it should work on RHEL6 variants, and still keep the same semantics.  If it
> works for you I'll push it up to github.
> 
> Frank Sweetser fs at wpi.edu    |  For every problem, there is a solution that
> Manager of Network Operations   |  is simple, elegant, and wrong.
> Worcester Polytechnic Institute |           - HL Mencken
> 
> On 03/20/2012 03:14 PM, apg at eecs.wsu.edu wrote:
> > While moving an existing Netreg install to a Centos 6 box, I came across this
> > error:
> > 
> > Can't use string ("CMU::Netdb::structure::credentia") as an ARRAY ref while "strict refs" in use at /opt/netreg/lib/CMU/Netdb/validity.pm line 1171.
> > 
> > The patch below seems to fix that error:
> > 
> > 1171c1171
> > <   return $in unless (defined @$TArray);
> > ---
> >>   return $in unless (defined $TArray);
> > 
> > 
> > 
> > 
> > Thanks!
> > 
> > 
> > -al
> > 
> > keepalived
> > 
> > 
> > ---------------------------------------------------------------
> >  Allen P. Guyer
> >  Unix Systems Administrator
> > 
> >  School of Electrical Engineering & Computer Science
> >  Washington State University
> > 
> > ==============================================================================
> > ...probability factor of one to one
> > ...we have normality, I repeat we have normality.
> > ==============================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 

> diff --git a/stable/netdb/lib/CMU/Netdb/validity.pm b/stable/netdb/lib/CMU/Netdb/validity.pm
> index a9c2c2c..b46c8eb 100644
> --- a/stable/netdb/lib/CMU/Netdb/validity.pm
> +++ b/stable/netdb/lib/CMU/Netdb/validity.pm
> @@ -1234,8 +1234,11 @@ sub verify_table_field {
>    }
>  
>    my $TArray = "CMU::Netdb::structure::${table}_fields";
> -  # Can't verify as the array doesn't exist.. but structure.pl tests this
> -  return $in unless (defined @$TArray);
> +  {
> +    no strict 'refs';
> +    # Can't verify as the array doesn't exist.. but structure.pl tests this
> +    return $in unless (defined @{$TArray});
> +  }
>  
>    my @SFields;
>    eval '@SFields = @'.$TArray.';';




Thanks!


-al

keepalived


---------------------------------------------------------------
 Allen P. Guyer
 Unix Systems Administrator
 apg at eecs.wsu.edu
 Phon 509.335.7332
 Cell 509.338.5540

 School of Electrical Engineering & Computer Science
 Washington State University

==============================================================================
...probability factor of one to one
...we have normality, I repeat we have normality.

Ineptocracy
(in-ep-toc'-ra-cy) - a system of government where the least capable to lead
are elected by the least capable of producing, and where the members of
society least likely to sustain themselves or succeed, are rewarded with goods
and services paid for by the confiscated wealth of a diminishing number of
producers.

==============================================================================













More information about the Netreg-devel mailing list