Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You need to sneak your PDFColumn method into the PDF::Create::Page package. The cheap and easy way to do this is to say:
Thus, when you say $page->PDFColumn, perl looks up what class $page is (I'm guessing it's a PDF::Create::Page) and attempts to call PDF::Create::Page::PDFColumn with $page as the first argument. Luckily, you've given perl such a method, so it's all happy. Update: Note that this is slightly sleazy -- if this is permanent code, you're better off using Ovid's method (no pun intended) perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER' In reply to Re: Making a function callable on an object
by Chmrr
|
|