Subject: | lib/Error.pm TIESCALAR method is incorrectly implemented |
lib/Errors.pm's implementation of TIESCALAR is :
sub TIESCALAR
{
my( $scalar, $class ) = @_;
return bless \$scalar, __PACKAGE__;
}
But the TIESCALAR methos is called as ClassName->TIESCALAR(LIST);
So $scalar ends up holding the class name, and I have seen errors
on at least one of my OSX build boxes caused by this and perl-5.8.8-tobe
The following patch is a more correct implementation and fixes the
problems I've seen (straight from Tie::Scalar):
sub TIESCALAR
{
my $class = shift;
my $instance = shift || undef;
return bless \$instance => $class;
}