in reply to Shorten one liners with Class::Autouse
A vaguely related footnote:
Ending a module with __PACKAGE__; instead of the usual 1; could be used to call a method on the result of the require.
$ cat Eg.pm package Eg; sub hello { print "Hello World\n"; } __PACKAGE__; $ perl -e '(require Eg)->hello()' Hello World
|
---|
In Section
Snippets Section