opensourcer has asked for the wisdom of the Perl Monks concerning the following question:
-----------package Utils::Agent; sub SetDestination { my $self = shift; my $class = shift; my $construct = "\$".$class; # i have lot of destination in different packages # so i can't say every time $pkg::destination $Destination = $construct::destination; return $Destination; }
and when i try this i get nothinguse Utils::Agent; use Data::Config; use Web::Config; my $config = new Data::Config; my $webConfig = new Web::Config; my $utils = new Utils::Agent; $utils->SetDestination(ref($config));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: calling scalar from scalar. symlinks
by ikegami (Patriarch) on Oct 25, 2006 at 18:04 UTC | |
by thezip (Vicar) on Oct 25, 2006 at 21:36 UTC | |
by ikegami (Patriarch) on Oct 25, 2006 at 21:37 UTC | |
by thezip (Vicar) on Oct 25, 2006 at 21:40 UTC | |
|
Re: calling scalar from scalar. symlinks
by quester (Vicar) on Oct 25, 2006 at 22:31 UTC |