J
J Krugman
When will Perl wonders *EVER* cease?
Despite *years* of programming in Perl I still come across legit
Perl code that I find as unfathomable as if I had just started
programming Perl one hour ago. And I'm not talking about the winner
of the Obfuscated Perl Contest.
What blindsids me this time around is in the CPAN module
Class::MethodMaker (v 1.12). About 90% of the code in
Class/MethodMaker.pm, which accounts for all the "supported methods"
for this module according to its documentation, appears *after*
the lines
1; # keep require happy
# ----------------------------------------------------------------------------
__END__
(See
http://search.cpan.org/src/FLUFFY/Class-MethodMaker-1.12/lib/Class/MethodMaker.pm.
The code for the most recent version of MethodMaker does the same
thing with __END__.)
What on earth is going on here? Every documentation I've managed
to find for __END__ says that the compiler doesn't go beyond it.
In the source prior to the __END__ there is no reading from <DATA>
and eval-ing the read text, and besides, this is a module not a
script, so reading from <DATA> would not work anyway.
How can this module work at all???
TIA!
jill
Perennial Perl Beginner
Despite *years* of programming in Perl I still come across legit
Perl code that I find as unfathomable as if I had just started
programming Perl one hour ago. And I'm not talking about the winner
of the Obfuscated Perl Contest.
What blindsids me this time around is in the CPAN module
Class::MethodMaker (v 1.12). About 90% of the code in
Class/MethodMaker.pm, which accounts for all the "supported methods"
for this module according to its documentation, appears *after*
the lines
1; # keep require happy
# ----------------------------------------------------------------------------
__END__
(See
http://search.cpan.org/src/FLUFFY/Class-MethodMaker-1.12/lib/Class/MethodMaker.pm.
The code for the most recent version of MethodMaker does the same
thing with __END__.)
What on earth is going on here? Every documentation I've managed
to find for __END__ says that the compiler doesn't go beyond it.
In the source prior to the __END__ there is no reading from <DATA>
and eval-ing the read text, and besides, this is a module not a
script, so reading from <DATA> would not work anyway.
How can this module work at all???
TIA!
jill
Perennial Perl Beginner