NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
What that is... (Score:1)
DateTime::Locale needs to call stuff as a method, not a function.
Re: (Score:2)
Re: (Score:1)
Compare:
$ foo->isa('UNIVERSAL') and print "yes\n"
<nothing>
to
$ package foo;
$ foo->isa('UNIVERSAL') and print "yes\n"
yes
I think U::can might get upset in this case... but who knows.
Another possibility... didn't that line use can as a function in an older version of the module? I can't get the warning to happen with the latest DateTime::Locale, but I could about a year ago.
Re: (Score:1)
$ use UNIVERSAL::can;
$ UNIVERSAL->can('can') and print "can can\n";
can can
$ FOOBAR->can('can') or print "cannot can\n";
Called UNIVERSAL::can() as a function, not a method at (eval 59) line 5
cannot can
$ package FOOBAR;
$ FOOBAR->can('can') and print "now can can\n";
now can can
Re: (Score:2)
canis a way to check if the module has been loaded. It's quicker than blindly usingrequirein every case, I think.Re: (Score:1)
That's the problem then. Your heuristic for testing if a class exists fights with my heuristic for testing if a class exists. I suppose U::i/U::c could skim through the optree for a
methodormethod_namedopcode, but that's a lot more work.Re:What that is... (Score:2)
Reply to This
Parent