Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re (tilly) 1: Refactor method calls or not?

by tilly (Archbishop)
on Jan 19, 2002 at 11:03 UTC ( #140055=note: print w/replies, xml ) Need Help??


in reply to Refactor method calls or not?

You could also create and install these in the package by assigning closures to typeglobs.
sub create_add_to_table { my $table = shift; sub { my ( $self, $data ) = @_; my $data = $self->_generic_insert( $data, $table ); $self->{ _dbh }->commit if ! $self->{ _error }; return $data; }; } *add_company = create_add_to_table('company'); *add_financial_diary = create_add_to_table("financialDiary");

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-04-23 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?