Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl semi-object without a constructor

by arnaud99 (Beadle)
on Feb 20, 2013 at 19:19 UTC ( #1019832=note: print w/replies, xml ) Need Help??


in reply to Perl semi-object without a constructor

Hi, it seems to me that in your first example, the connect method is part of a package that also defines a class. If this is the case then all methods within that package are being passed silently the object reference as the first parameter. This is why you only need 3 parameters to call the method. What is called $pkg here is usually called $self. I hope this helps.
  • Comment on Re: Perl semi-object without a constructor

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019832]
help
Chatterbox?
LanX has to run. .. o/
[zentara]: modern styles are secondary to display readability. Tk is automatically good at the clunky industrial theme. :-)
[ww]: Amen!
zentara is a prayin and a hopin that a cell phone comes along which will let me use Perl/Tk in the display. :-)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-05-26 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?