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

Re: My first stab at OO perl...

by Anonymous Monk
on Jul 17, 2002 at 00:46 UTC ( [id://182289]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub add_expense { # takes Expense object as argument and adds it to _E
    +XPENSES array
        my $self = shift;
    ...
        push(@expenses,$newexp);
        $self->{_EXPENSES} = \@expenses;
    }
    
  2. or download this
        my $self = shift;
        my $newexp = shift;
    
  3. or download this
    my ($self, $newexp) = @_;
    
  4. or download this
    my @expenses = @{$self->{_EXPENSES}};
    
  5. or download this
    sub add_expense { # takes Expense object as argument and adds it to _E
    +XPENSES array
        my ($self, $newexp) = shift;
        $self->{_EXPENSES}{$newexp} = $newexp;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found