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

I suspect that Abigail was emphasizing the arbitrary nature of perl namespaces. The best use of main as a class is to avoid being in a different class. It seems to me to be mostly a stunt, but I too would be edified to see a useful counterexample.

After Compline,
Zaxo

  • Comment on Re: Creating an object of class main, useful?

Replies are listed 'Best First'.
Re^2: Creating an object of class main, useful?
by davido (Cardinal) on Jul 17, 2004 at 07:12 UTC

    It took some careful thought on what criteria to feed Super Search, but I re-found the post by Abigail-II (from a few months ago) that popped back into my mind out of the blue today, leading me to post this thread.

    Here's the link: Re: s/\w/random character/g. In his post, he ties a hash to package main as a cheap / quick and dirty way of implementing a cool solution.

    Of course the tied hash isn't the point to my post, but the fact that he tied it to main lead me to realize that there's no reason main can't be a class just like any other package. ...and of course that leaves the original question in tact: why would I want to do that? *grin*


    Dave