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

Re^3: use fields; # damnit

by tphyahoo (Vicar)
on Jul 06, 2005 at 10:50 UTC ( #472753=note: print w/ replies, xml ) Need Help??


in reply to Re^2: use fields; # damnit
in thread use fields; # damnit

Adrianh, I don't understand what you mean by "we have to control the base-class." I thought the fields pragma played well with inheritance. Could you give a concrete example where this would be a problem?

ps, I just posted a followup to this thread at Should I use Fields, InsideOuts, or Properties?.


Comment on Re^3: use fields; # damnit
Re^4: use fields; # damnit
by adrianh (Chancellor) on Jul 06, 2005 at 12:11 UTC
    Adrianh, I don't understand what you mean by "we have to control the base-class." I thought the fields pragma played well with inheritance. Could you give a concrete example where this would be a problem?

    The fields pragma only plays well with classes that have also been built with the fields pragma.

    If I want to subclass a class that's based around a blessed hashref or coderef then I'm out of luck.

    Since I often code with classes than I do not control (e.g. classes from CPAN) that are not implemented with pseudohashes I can't use the fields pragma with them.

    Make sense?

Re^4: use fields; # damnit
by tphyahoo (Vicar) on Jul 06, 2005 at 12:18 UTC
    OK, I get it. Thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-08-23 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls