Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Modify the Object

by Athanasius (Monsignor)
on Oct 02, 2012 at 13:02 UTC ( #996856=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub access_A
    {
    ...
        $self->{A} = $new_a if defined $new_a;
        return $self->{A};
    }
    
  2. or download this
    my $obj = new First('A' => 'red',
                        'B' => 'green');
    print "Here, A's colour is ", $obj->access_A(), "\n";
    $obj->access_A('yellow');
    $obj->teller();
    
  3. or download this
    Here, A's colour is red
    $VAR1 = bless( {
                     'A' => 'yellow',
                     'B' => 'green'
                   }, 'First' );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2014-10-02 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (56 votes), past polls