Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Module::Build and PM_FILTER (lots of ways)

by tye (Sage)
on Dec 08, 2004 at 17:07 UTC ( #413264=note: print w/replies, xml ) Need Help??


in reply to Module::Build and PM_FILTER

There are lots of other ways to do that type of thing. Switch to one of them.

You can define a strlen() function that varies depending on version.

*strlen = $use_unicode ? sub { $_[0]->length() } : sub { length($_[0]) };

You can do like my XML::Fling (never made suitable for release to CPAN and no longer available for download due to sudden ISP bankruptcy) where I include a template.plx that I do all of the maintenance on. I run template.plx to generate lib/XML/Fling/Array.pm, lib/XML/Fling/String.pm, and lib/XML/Fling/File.pm and just include all of that in the distribution. So the distribution installs normally. You only need to worry about template.plx if you want to make a change to the module and then you just need to remember to run template.plx to apply your changes (just like you need to remember to test before you release).

So your template.plx would write a lib/PDF/Template/Unicode.pm and lib/PDF/Template/Ascii.pm or whatever and put code that needs templating into the template.plx and require the appropriate PDF::Template::Unicode or PDF::Template::Ascii depending on what is supported.

- tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2020-11-28 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?