Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Advice please on variable naming style in modules

by Jenda (Abbot)
on Aug 22, 2012 at 14:51 UTC ( #989065=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Advice please on variable naming style in modules
in thread Advice please on variable naming style in modules

What's "self" to you is isync to me. If the menu needs access to the top window, it should have a $top_window. The fact that within the methods of the top window the same reference will be in a variable called $self is irrelevant. To the method within the menu it's $top_window, not $self.

<!-- Node text goes above. Div tags should contain sig only -- >

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^3: Advice please on variable naming style in modules
Re^4: Advice please on variable naming style in modules
by isync (Hermit) on Aug 22, 2012 at 21:08 UTC
    Right, and more or less what tye and I agreed upon: what seems to make sense is: it's $self in the module and a var-name that reflects function everywhere else - as an example, for the $self of App, this could be $app (reflecting function), or could be $top_window (if you favour denoting hierarchical meaning).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-09-17 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (66 votes), past polls