#file UTest.pm package UTest; use warnings; use strict; sub new { my $class = shift; my $self = { 'name' => '', 'condition' => '', 'args' => [], }; return bless $self, $class; } # other sub ... 1;
#file Service.pm package Service; use UTest; our @ISA = qw(UTest); sub new { my ($class) = shift; my $self = UTest->new(); $self->{'captures'} = {}; bless $self, $class; return $self; } #others sub... 1;
I get following error when i run test.pl:#file test.pl use Lib::Service; my $service = Service->new; #... other codes
Can someone help me? Thanks.Can't locate UTest.pm in @INC (@INC contains: /etc/perl /usr/local/lib +/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/p +erl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl + .) at Lib/Service.pm line 2. BEGIN failed--compilation aborted at Lib/Service.pm line 2. Compilation failed in require at ./mytest.pl line 2. BEGIN failed--compilation aborted at ./mytest.pl line 2.
In reply to Perl module in a user local folder by niqola
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |