in reply to Building Perl Modules

G'day anek77713,

"Can someone give me a hint?"

One of the first tools I reach for when seeking Perl information is Perldoc. This is available online from http://perldoc.perl.org/perl.html (I recommend you bookmark this) and as the commandline utility perldoc.

"What should I read to learn building modules over existing ones?"

This is very vague: "building" (writing? creating? other?); "over" (on top of/replacing? instead of? subclassing? other?); "existing" (builtin? CPAN? in-house? other?).

Under the Reference Manual section of the link I provided above, you'll find a block of six links whose descriptions all start with "Perl modules:":

One or more of those may well provide the information you're looking for. If not, please ask a more specific question.

-- Ken

Replies are listed 'Best First'.
Re^2: Building Perl Modules
by anek77713 (Acolyte) on Jul 23, 2013 at 09:45 UTC

    Thnx for the answer!!!!

    The problem is:

    Module : Pod::PseudoPod::HTML

    I wish to write a module... That will be:

    Pod::PseudoPod::HTML::Book

    But I can't understand how to make this...

    How to link the content of Book to the Pod::PseudoPod::HTML to use the code from up the tree

      Many (probably most) documentation pages have a SEE ALSO section which provides links to related documentation. The first "Perl module: ..." link I provided above ("perlmod Perl modules: how they work") has a link to perlootut - Object-Oriented Programming in Perl Tutorial. (It sounds like a tutorial is what you need.) Within that documentation, you'll find the answer to your question:

      "Inheritance lets you create a specialized version of an existing class. Inheritance lets the new class reuse the methods and attributes of another class. ..."

      -- Ken

        Thnx Ken! This helped me a lot!
      use strict; use warnings; package Pod::PseudoPod::HTML::Book; use base 'Pod::PseudoPod::HTML'; # ... your code goes here ... 1;
      package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
        Thnx!