Link to home
Start Free TrialLog in
Avatar of wangtian
wangtian

asked on

load library

Dear friends,

I meet a question in OO perl:

I have a module named:"LDCIDPORTController",
and i define constructor as:

#-------------------------------------
# constructor
# ------------------------------------
sub new
{
  my ($class, $config, $log ) = @_;
  my $self = {};

  $self->{config} = $config;
  $self->{log} = $log;

  bless ( $self, $class);
  return $self;
}


in my main programming, i load this lib by :
#!/tools/perl/bin/perl -I/export/home/yw5726/export/lduser/filter/lib:/export/home/yw5726/export/commonlib

but when i run it, got the error:

Can't locate object method "new" via package "LDCIDPORTController" at /export/home/yw5726/export/commonlib/Manager.pm line 75



Can someone give me some advice how to debug it?

Thanks ahead.

ASKER CERTIFIED SOLUTION
Avatar of japhyRPI
japhyRPI

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial