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
|
|---|