Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

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

Mojo is quite impressive for what it manages to do without dependencies. But really, say I bundled all the other distributions Web::Magic replies upon, and packaged them with Web::Magic. Then I could say it had no dependencies too. Many of Web::Magic's dependencies are indeed modules that I wrote, so I could have easily chosen to package them all into one distribution.

But it seems more logical to provide more, smaller, independently testable and independently usable releases. And rely on a tool to keep track of dependencies between them. Perhaps a tool with a good track record of managing dependencies for Perl modules? Perhaps a tool that has been bundled with Perl for well over a decade?

That 42% (actually 43% according to today) statistic is very misleading. The site that calculates the statistic acknowledges this.

In practice the only dependencies of Web::Magic which have worrying fail rates are B::Utils which fails a lot on BSD, but seems reliable on other operating systems, and XML::Feed which has some date formatting test cases that seem to sometimes fail. (An Atom test case which expects a datetime in the floating timezone, receives one in UTC.) A force install on XML::Feed will almost certainly still give you a working copy.

That said, Mojo's claimed HTML5 credentials are a bit suspect. The following code illustrates that Mojo::DOM's HTML5 conformance is not quite there yet:

use Modern::Perl; my $html5 = do { local $/ = <DATA> }; { say "HTML::HTML5::Parser:"; use HTML::HTML5::Parser; use XML::LibXML::QuerySelector; my $dom = HTML::HTML5::Parser->new->parse_string($html5); say $dom->querySelector('tbody')->textContent; } say "----"; { say "Mojo::DOM:"; use Mojo::DOM; my $dom = Mojo::DOM->new($html5); $dom->find('tbody')->each(sub{say $_->all_text}); } __DATA__ <!doctype html> <title>Greetings</title> <table><tr><td>Hello World</table> <!-- This is a valid HTML5 document. See + -->

For comparison, try the following in a modern, HTML5-capable browser (tested Firefox 3 and Opera 11):

<!doctype html> <title>Greetings</title> <table><tr><td>Hello World</table> <script type="application/ecmascript"> window.alert(document.querySelector('tbody').textContent); </script>

In reply to Re^4: Web::Magic 0.005 by tobyink
in thread Web::Magic 0.005 by tobyink

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
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (3)
    As of 2020-12-02 00:30 GMT
    Find Nodes?
      Voting Booth?
      How often do you use taint mode?

      Results (26 votes). Check out past polls.