Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: object oriented Perl advice / constructor creation in child class

by haj (Vicar)
on Jul 10, 2018 at 09:09 UTC ( #1218227=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # A.pm
    package A;
    use 5.014;
    ...
    }
    
    1;
    
  2. or download this
    # C.pm
    package C;
    use 5.014;
    ...
        say 'Goodbye, ', $self->name, '!';
    }
    1;
    
  3. or download this
    # C1.pm
    package C1;
    use 5.014;
    ...
             );
    
    1;
    
  4. or download this
    use strict;
    use warnings;
    ...
    my $c = C1->new(name => 'John Doe');
    $c->say_hello('World');
    $c->say_goodbye;
    
  5. or download this
    package C1;
    use parent (qw(A B C D));
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218227]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2023-12-05 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (27 votes). Check out past polls.

    Notices?