Subject: | warnings in overwritten UNIVERSAL::can |
The original UNIVERSAL::can method accepts an undef as first parameter
without throwing warnings. The can method provided by Class::Std throws
warnings if the first param is an undef.
I've attached an diff which fixed the problem.
Test Sample
------------
andreas@steffi ~ $ perl -w -e "package Test123; use Class::Std 0.0.8;
package main; UNIVERSAL::can(undef, 'nothing');"
Use of uninitialized value in exists at
/usr/lib64/perl5/site_perl/5.8.8/Class/Std.pm line 212.
Use of uninitialized value in concatenation (.) or string at
/usr/lib64/perl5/site_perl/5.8.8/Class/Std.pm line 217.
Use of uninitialized value in hash element at
/usr/lib64/perl5/site_perl/5.8.8/Class/Std.pm line 226.
Use of uninitialized value in hash element at
/usr/lib64/perl5/site_perl/5.8.8/Class/Std.pm line 225.
Use of uninitialized value in concatenation (.) or string at
/usr/lib64/perl5/site_perl/5.8.8/Class/Std.pm line 569.
Subject: | Std.pm.diff |
563,564d562
< defined $_[0] or return;
<