Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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        


In reply to Re: Module::Build and PM_FILTER (lots of ways) by tye
in thread Module::Build and PM_FILTER by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (3)
    As of 2020-11-30 02:06 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?