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;
    }