There are many ways of calling code that is not immediately visible:
eval q{sub foo{print "Hello World"}} # or, somewhat cleaner, with Perl checking your # syntax at compile time: { no strict 'refs'; *{__PACKAGE__ . "::foo"} = sub { print "Hello World"; }; }; # ... and many more methods
I think this catches all common cases of creating methods, but I might have overlooked something.
In reply to Re: Calling undefined method
by Corion
in thread Calling undefined method
by shyju
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |