Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to use a class to use its methods in my subclass in Perl?

Alrighty, coding in Perl and just had a quick question. I have class created called SubtitleSite which is basically an abstraction, and a class called podnapisi that inherits SubtitleSite like this:

@ISA = qw(SubtitleSite);

My question is, do I have to use:

use SubtitleSite;

in order to have access to all the methods in SubtitleSite?

like image 395
codygman Avatar asked Dec 06 '22 04:12

codygman


1 Answers

Yes, but most of the time you're better off not messing with @ISA directly. Just use parent qw(SubtitlesSite);, it will load SubtilteSite for you and add it to @ISA.

like image 90
Ronald Blaschke Avatar answered Dec 28 '22 05:12

Ronald Blaschke