Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Inheritable configuration options.... but with default values?

by LanX (Saint)
on Feb 21, 2020 at 00:24 UTC ( [id://11113291]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Inheritable configuration options.... but with default values?
in thread Inheritable configuration options.... but with default values?

> But package variables are not "object variables" or member variables (?whatever?)

yeah, but I tought that's what the OP asked for !?!

> > > Basically i have a series of classes and subclasses, each level adding a bit more functionality to its parent and in each class i have behaviour which can be modified by configuration options which are specific to that class

see? Class not Object.

> That's a lot of boiler work (for me ;) ).

Well my code was shorter than yours. ;)

(...and I'm sure this could be even shortened further with some sugar)

> and for a package variable %{$self->SUPER::cfg};

I doubt it, according to the docs cfg here - i.e. the part after SUPER:: - must be a sub in the super class.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found