Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by tilly (Archbishop)
on Jan 19, 2002 at 11:03 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://140055]
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: (3)
As of 2026-03-07 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.