May 24, 2013, 2:27 PM
Post #1 of 6
Error while creating code for inheritance
I am trying to inherit class lolol to class L, but when I run the program I get the error:
back.pl is my perl file name
can't locate parent.pm in @INC <@INC contains: c:/Perl/site/lib c:Perl/lib .> at back.pl line 28[\b]
BEGIN FAILED---compilation aborted at back.pl line 28[\b]
line 28 is the line where I have mentioned code for inheriting super class
my $ko=new lolol;
use parent 'lolol';
my $child=new L('bolt',4);
I went through net, but found that nothing is missing in respect to this @INC, all I need to mentioned some path.
I tried that, but I code didn't work do that. (used Exporter, etc keywords).
Any help will be greatly appreciated.
Seniors and forum members kindly help me.
Thanks in advance!