I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-12-08 09:44:52.165273-08 by binarybits
Creating my own renderer
Hi, I'm having trouble figuring out the "right" way to create my own renderer. I want to create a module like Dump.pm that allows me to supply a callback function like renderText() that will be called on each text object in a page. On my own laptop, I've found I can create a file called Mydump.pm in /Library/Perl/5.8.8/CAM/PDF/Renderer, and it works as expected. However, this seems pretty clumsy and more importantly I don't have root access on the machine where I'm actually trying to run this code. I've tried passing various strings to
$contentTree->render();
, but I haven't figured out how to get it to call a module outside of the CAM/PDF/Renderer directory. Is there a trick to this I'm missing? Or do I need to convince my sysadmin to install my renderer into the system-wide CAM::PDF module? Thanks! -Tim
Direct Responses: 13103 | Write a response
Posted on 2010-12-08 20:55:17.67031-08 by cdolan in response to 13102
Re: Creating my own renderer
At the top of your main program, add a line like "use lib '/path/to/my/files';" That adds another folder to the @INC search path. See also: http://perldoc.perl.org/lib.html
Direct Responses: 13106 | Write a response
Posted on 2010-12-11 12:08:58.809037-08 by binarybits in response to 13103
Re: Creating my own renderer
That works. Sorry for the lame question. Thanks!
Direct Responses: 13107 | Write a response
Posted on 2010-12-11 13:31:01.865099-08 by cdolan in response to 13106
Re: Creating my own renderer
No problem. I like questions I can answer easily! :-)
Direct Responses: Write a response