Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

package main

by rinceWind (Monsignor)
on Jul 17, 2004 at 08:45 UTC ( [id://375213]=note: print w/replies, xml ) Need Help??


in reply to Creating an object of class main, useful?

As an aside, you don't actually need to say package main;.

However, we might start seeing this appearing in perl 5 scripts in future, see Ensuring forward compatibility.

--
I'm Not Just Another Perl Hacker

Replies are listed 'Best First'.
Re: package main
by meredith (Friar) on Jul 17, 2004 at 17:08 UTC

    Not only for forward compatibility, but also for clarity. I know that you can look at something you wrote 3 days ago and have no idea what it does! If we're doing something weird like this, it's probably the best idea to make this disgusting hack as clear as possible to the reader. =)

    mhoward - at - hattmoward.org

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found