Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I use @ISA and use strict at the same time?

by Vynce (Friar)
on Jun 05, 2001 at 13:45 UTC ( [id://85759]=note: print w/replies, xml ) Need Help??


in reply to How do I use @ISA and use strict at the same time?

TIMTOWTDI:

use strict; package Question::Loaded; use vars ('@ISA'); @ISA = ('Question');
or
package Question::Open; @ISA = ('Question'); use strict;
or
package Question::MillionDollar; use strict; our @ISA = ('Question'); # if (perl -v >= 5.6)
and there are other ways, too. it's a matter of style.

Edit by tye: Note that use strict can appear before the package line but that putting use vars before the package line will cause the file to fail to compile while putting our before the package line will not work in less obvious ways.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found