sman has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone,

I like this forum because everyone here is so enthusiastic and would like to help each other.

I am confused with these three terms : class/module/component. I am wondering are they the same thing in Perl? Because I was a Java developer for years and for Java, there is only one term, that is 'class'. I guess object/instance in Perl is the same as Java but not sure about class/module/component.

Look forward to your thought.

Thanks.

Replies are listed 'Best First'.
Re: Question about class/module/component
by WizardOfUz (Friar) on Jan 21, 2010 at 18:41 UTC
      Thanks. I'm reading it now.
Re: Question about class/module/component
by crashtest (Curate) on Jan 21, 2010 at 22:27 UTC

    I thought I'd refer you to my reply in an old thread with a similar topic.

    I'm a Java guy myself (involuntarily at work). The biggest mental block I had regarding Perl's system for organizing code is basically: in Perl, a file != a module. That is, one single file can contain code for multiple namespaces... or there can be multiple files, all with code for a single namespace. This is in contrast to Java, where each file starts with a package declaration (or it's implicitly the default package), and you're working with your chosen namespace for the entire file.

    perlmod is your definitive guide for all this.

Re: Question about class/module/component
by Anonymous Monk on Jan 22, 2010 at 02:34 UTC