Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: package Foo; isa Bar; why not?

by demerphq (Chancellor)
on Dec 19, 2003 at 17:43 UTC ( #315852=note: print w/ replies, xml ) Need Help??


in reply to package Foo; isa Bar; why not?

Hi Liz. Im a little confused why a simple

package Foo; BEGIN { @ISA=qw( blah blah blah ); }

Doesnt cut it in your eye. For me the capitalization, the BEGIN, etc, all make this a much more potent way to write this. Its immediately obvious that "theres some voodoo going on" and what that voodoo is. Your isa approach doesnt tickle my fancy im afraid.

I will say that I agree with your issues with use base. I pretty much dont use it anymore, as I've found there are bizarre situations where it doesnt do what you might expect.

Actually on a less serious level, a module like:

package CompileTime; 1

Which could then be used like:

use CompileTime @ISA=qw(blah blah blah);

Which I guess is just a fancy BEGIN without the squiggle brackets. :-)


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi



Comment on Re: package Foo; isa Bar; why not?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2015-07-05 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls