in reply to Can't locate object method 'new' ??
And I'm assuming it installed correctly ...
There's nothing wrong with the code:
c:\test>copy con testModule.pm #!/usr/bin/perl package testModule; use strict; use warnings; sub new{ my $class = shift; my $self = {}; bless $self, $class; return $self; } sub printSomething{ return 'Something!'; } 1; ^Z 1 file(s) copied. c:\test>copy con testTestModule.pl #!/usr/bin/perl -w use strict; use testModule; my $ob = new testModule; print $ob->printSomething; ^Z 1 file(s) copied. c:\test>testTestModule.pl Something!
Which only leaves an installation error. Wherever it is being installed, it would appear to be somewhere Komodo can find it, but your (default?) Perl installation cannot.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't locate object method 'new' ??
by isshino (Initiate) on Aug 28, 2009 at 02:12 UTC |