in reply to object oriented module question
package My::Module; use Text::CSV; sub new { my $class = shift; my $self = { _text_csv => Text::CSV->new( ... ), # we store the object her +e }; bless $self, $class; } sub some_method { my $self = shift; # we use it here my $result = $self->{_text_csv}->some_text_csv_action( @input ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: object oriented module question
by exussum0 (Vicar) on Sep 07, 2007 at 11:44 UTC | |
by former33t (Scribe) on Sep 07, 2007 at 15:16 UTC | |
by rhesa (Vicar) on Sep 07, 2007 at 18:17 UTC | |
by former33t (Scribe) on Sep 10, 2007 at 16:25 UTC | |
by convenientstore (Pilgrim) on Sep 07, 2007 at 20:00 UTC | |
|
Re^2: object oriented module question
by Anonymous Monk on Sep 07, 2007 at 05:15 UTC | |
by erroneousBollock (Curate) on Sep 07, 2007 at 05:43 UTC |