Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Breaking up a big module

by hdb (Monsignor)
on Apr 25, 2019 at 13:34 UTC ( #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
Node Status?
node history
Node Type: note [id://1232983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2019-08-19 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (141 votes). Check out past polls.

    Notices?