STork2000 has asked for the wisdom of the Perl Monks concerning the following question:
ConfigFile.pmuse strict; use ConfigFile; use TestClass; my $conf = new ConfigFile; my $object = new TestClass; $object->test();
TestClass.pmpackage ConfigFile; sub new { my $that=shift; my $class=ref($that) || $that; my $self={ Verbose => 1, RaiseErrors => 0}; bless $self, $class; return $self; } sub get_conf { my $self=shift; my $param=shift; my $result; # get result return $result; } 1;
Problems:package TestClass; sub new { my $that=shift; my $class=ref($that) || $that; my $self={ Verbose => 1, RaiseErrors => 0}; bless $self, $class; return $self; } sub anything { my $self=shift; # # Here we nave a get object $conf from a test.cgi script. # return; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with objects.
by izut (Chaplain) on Mar 14, 2006 at 13:10 UTC | |
|
Re: Help with objects.
by xdg (Monsignor) on Mar 14, 2006 at 14:08 UTC | |
|
Re: Help with objects.
by pajout (Curate) on Mar 14, 2006 at 10:36 UTC | |
by STork2000 (Novice) on Mar 14, 2006 at 11:10 UTC | |
by wazoox (Prior) on Mar 14, 2006 at 12:11 UTC | |
by pajout (Curate) on Mar 14, 2006 at 12:20 UTC |