Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Shorten one liners with Class::Autouse

by bsb (Priest)
on Mar 30, 2007 at 08:13 UTC ( [id://607413]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://607413]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-29 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found