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

Re^2: Breaking up a big module

by hdb (Monsignor)
on Apr 25, 2019 at 13:34 UTC ( [id://1232983]=note: print w/replies, xml ) Need Help??


in reply to Re: Breaking up a big module
in thread Breaking up a big module

I was writing this code while you were posting...

use strict; use warnings; package Foo; use parent 'Foo_Bar'; sub new { my $class = shift; return bless {}, $class; } sub aa { my ( $self, $args ) = @_; my $val = $self->_aa ( $args->{'bar'} ); print "aa\n"; } package main; my $foo = Foo->new(); $foo->aa( { arg1 => 'some' } );

and in Foo_Bar.pm (underscore instead of :: only for my convenience):

use strict; use warnings; package Foo_Bar; sub _aa { my( $self, $quux ) = @_; print "\t_aa\n"; } 1;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-25 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found