Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Making a function callable on an object

by Kanji (Parson)
on Apr 15, 2002 at 23:38 UTC ( [id://159370]=note: print w/replies, xml ) Need Help??


in reply to Making a function callable on an object

All you need do is make sure PDFColumn and $page share the same namespace, either by declaring your sub into PDF::Create's ...

sub PDF::Create::PDFColumn { my $page = shift; my $params = shift; # ... }

... or (more elegantly) by sub-classing ...

package PDF::Create::Column; # Try looking for any methods not defined here # in PDF::Create instead. use base qw/ PDF::Create /; sub PDFColumn { my $page = shift; my $params = shift; # ... } 1;

    --k.


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-19 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found