Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: perl oop concept

by tobyink (Abbot)
on Dec 04, 2012 at 07:07 UTC ( #1007022=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package a;
    
    ...
    }
    
    my $obj = new a ();
    
  2. or download this
    my $obj = "a"->new();
    
  3. or download this
    $obj ->{$self}{avalue}=10;
    print $obj->{$self}{avalue};
    
  4. or download this
    {
      package a;
    ...
    my $obj = "a"->new();
    $obj->avalue(10);           # set
    print $obj->avalue, "\n";   # get
    
  5. or download this
    {
      package a;
    ...
    my $obj = "a"->new();
    $obj->avalue(10);           # set
    print $obj->avalue, "\n";   # get
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-12-27 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls