skywalker has asked for the wisdom of the Perl Monks concerning the following question:
the header from package Mailsort is asuse lib ('G:\Perl Live\OO Packages'); use Mailsort; use strict; my $file = 'J:\sample file.csv'; my $ob = new Mailsort($file); #unable to call this method which is in class Mailsort_scj $ob->update_database('DSA','a database'); print $ob->{DATABASE}."\n";
the header from class Mailsort_scj is as follows;package Mailsort; use lib ('G:\Perl Live\OO Packages'); require Exporter; require Mailsort_scj; require Filedetails; use strict; use Carp; my @ISA = qw(Exporter Filedetails Mailsort_scj); sub new{ my ($proto,$type) =@_; my $typein = ref($type) || $type; my $params = new Mailsort_scj($typein); &initialise($params); bless ($params,$typein); return($params); }
any pointers would be greatly appreciated; thanks Skywalkerpackage Mailsort_scj; require Exporter; require Filedetails; use strict; use Carp; my @ISA = qw(Exporter Filedetails Mailsort_scj); my @EXPORT = qw(update_database update_options update_tntoptions update_inputformat create_scj update_Foreign_Addresses Redirect_Rejects); sub new{ my ($proto,$filein) = @_; my $type = ref($proto) || $proto; my $params = new Filedetails; $params->{FileName_IN} = $filein; &initialise($params); bless $params,$type; return $params; } sub update_database{ my ($class,$type,$value) = @_; my $valuein = ref($value) || $value; $class->{Database}{$type} = $valuein; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to method Inheritance
by chromatic (Archbishop) on May 06, 2009 at 18:06 UTC | |
by skywalker (Beadle) on May 06, 2009 at 18:38 UTC | |
by afoken (Chancellor) on May 06, 2009 at 18:55 UTC | |
|
Re: how to method Inheritance
by ikegami (Patriarch) on May 06, 2009 at 16:00 UTC |