I have declared two classes baseclass - chocolatecake.pm, derived class - birthdaycake.pm in perl language. the following error is shown. can anyone please explain what this error means??
code for reference:
print "The cake is backing\n"
print "The cake is frosing\n";
print "The $numOfCan in chocalate cake\n";
@ISA = (chocalate_cake);
print "The $numOfCan in birthday cake\n";
use Scalar::Util 'blessed';
Two problems here:
chocolate_cakeare two different strings.
Also, it'll help you in the future if you get into the habit of using
warnings in all your scripts.
birthday_cake->new is safer then the "indirect object syntax" you used (and if you're paranoic, you can use
'birthday_cake'->new as I usually do, or even
birthday_cake::->new, especially when you don't use Capitalized class names).