in reply to Making a function callable on an object
You need to sneak your PDFColumn method into the PDF::Create::Page package. The cheap and easy way to do this is to say:
sub PDF::Create::Page::PDFColumn { my $self = shift; # get the hashref of parameters: my $params = shift; # ... }
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'
|
|---|