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

Comment on

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

Speed was not my concern, and I certainly wouldn't quibble over a 10% speed issue. (The user generally won't even notice a speed difference until it's at least 50%.)

The reason I am looking forward to dumping all the legacy Perl4 malarke is because of its impact on coding, especially in terms of unexpected behavior and bugginess.

Consider, for instance, an issue we recently ran into with SVG::Metadata, as follows: this module had been using XML::Twig to parse the metadata from SVG files. (SVG is an XML format.) Bryce had set it up to use Twig's simplify method to produce a hash-reference structure, which the code in's parse routine was navigating in more or less the usual way, e.g., $metadata->{'rdf'}->{'Work'} and so forth.

However, as we started dealing with SVG produced by different SVG editors, we found that we were running into namespace issues; some SVG might list those elements as RDF:rdf and cc:Work, for example. So we put in code, similar to the above, but with extra logic like $elt->{'rdf'} || $elt->{'rdf:RDF'} ||$elt->{'RDF'} to check for those. Oops. Do you see the problem? Neither did we, at first.

What on earth is a pseudohash? Turns out, it's some kind of inane legacy thing from the days of yore before Perl supported references, and as a result, you aren't allowed to test for a hash key containing a colon, if it might not exist. Serious bugs result. We ended up dumping the simplify()'ed hash-reference structure entirely in favor of XML::Twig objects and their methods, like $elt->first_descendant('rdf:RDF') Granted, I'm more comfortable with the methods anyway, now that I have taken the trouble to download about half of XML::Twig's rather lengthy POD into my brain, and it does allow us to dispense with checking for optional intermediate wrapper elements, and the resulting code is probably less buggy too; nevertheless, I spent hours ironing out this issue. I seriously doubt I'm the only one ever to bang into it. Who would have thought that a hash key (which is, after all, just a string) would have issues with containing a colon? Boo, hiss.

There are other legacy Perl4 things besides the two we've discussed in this thread. They're all going away in Perl6, and I'm glad.

"In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."  — Pratico & Van Pelt, BBHG, p68

In reply to Re: Why no warnings for 1 in void context? by jonadab
in thread Why no warnings for 1 in void context? by tlm

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?

    What's my password?
    Create A New User
    [vedagiri89]: hi all! i need your help
    [vedagiri89]: i'm facing this issue: Attempt to reload aborted.\ nCompilation failed in require at /usr/lib64/perl5/ vendor_perl//APR. pm line 19.\nBEGIN failed--compilatio n aborted at /usr/lib64/perl5/ vendor_perl//APR. pm line 19.
    [vedagiri89]: how do fix this issue

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (8)
    As of 2018-06-19 11:11 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (113 votes). Check out past polls.