Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
My goodness, it's been a long day. I spent an hour tracking down a bug caused by the following code.
my @methods = qw/follow_link get title/;
use Class::MethodMaker
new => 'new',
object => [
'WWW::Mechanize' => {
slot => 'browser',
comp_mthds => [@methods],
}
];
If it doesn't just jump out at you, you'll slap yourself when you find it.
Oops (Score:1)
And, out of interest, do you use
@methodsanywhere else? Looks like a useless use of variable to me. [qw/.../] is perfectly fine...Re:Oops (Score:3, Interesting)
Oh goody. You're going to slap yourself :)
The first thing you do is create a file named "Foo.pm":
Then, in the same directory, run the following script:
That prints "Foo". Foo's import method gets called with no arguments because the assignment to @methods happens after the use statement, even though strict does not complain because @methods has al
Re:Oops (Score:2)
--
xoa
Re:Oops (Score:1)
Re:Oops (Score:1)