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