user-pic

tommolesworth.myopenid.com

  • Commented on SQLite and Writes
    Useful information, thanks for that. Is there any particular reason for the manual error checks on each step rather than setting the RaiseError flag? (this modified version of 02_busy.t seems to indicate that it throws an error as expected, on...
  • Commented on Subtle Template Toolkit bug / quiz
    Should work as expected if you use the SET syntax instead, I think? SET foo = 1 IF 0; Without that, a new value will be stashed in foo regardless of the expression - last I checked it'll compile to...
  • Commented on An example using Mojo::DOM for rewriting HTML
    heh, thanks Joel - that was a quick fix indeed! Toby - thanks for the link, I’d not tried HTML::HTML5::Parser before. Always useful to have an alternative parser that can handle “real-world” data....
  • Commented on An example using Mojo::DOM for rewriting HTML
    Mojo::DOM is a very useful module to have around, particularly with the CSS3 support as you mention. Perhaps only fair to mention that Perl has had excellent support for HTML mangling for some time now - using TreeBuilder, for example:...
  • Commented on Forgive me, for I have sinned
    If all the modules are in a single script file, I think module_path would return undef for everything (or worse, a path to a module hanging around in @INC that would never be loaded), so just wondering if perhaps it's...
  • Commented on Forgive me, for I have sinned
    Sounds like another excellent review in the series - thanks for these, I'm finding them very useful. Not sure how that SL replacement would work, though: that assignment will happen after the BEGIN block so any special-cased value you put...
  • Commented on Not to Hot for Mojo
    Oh! the horrors of using XML::LibXML or XML::DOM or those other hairy XML modules to get at the data. Interesting article, but I think you're overstating the horror of the XML modules here. An XML::TreeBuilder equivalent is longer than...
  • Commented on When Perl is not applicable
    Look, I've got a list of numbers, one for a day. Now, you need to receive these numbers: count(*) and sum(value) during January, count(*) and sum(value) during February etc, together with count/sum for every week of Jan, Feb etc....
  • Commented on CPAN modules for making HTTP requests
    That's a great list, thanks for sharing. For completeness, it'd be good to see some of the event-based modules in there - personally I use Net::Async::HTTP these days, but a quick search shows these as well: POE::Component::Client::HTTP AnyEvent::HTTP::LWP::UserAgent AnyEvent::HTTP There's...
  • Commented on I Want My Objective-C
    If you want to implement that no failing 'deref' pragma, it probably wouldn't be too hard to adapt something like this (or Leon's Scalar::Andand which appears to use the same autobox approach): perl -e'use strict; use warnings; package UndefHandler; our...
  • Commented on Useful CPAN Modules
    Task::Kensho is one of the first things I install - it pulls in lots of useful modules....
  • Commented on You're Wrong!
    huh, you sure that's the right link? I see only 22 comments there: First (top-level) comment: "Don't use a specific version unless it's genuinely version-dependent". Seems like reasonable advice, and the followup from the same poster: "No need to say...
  • Commented on Putting the ideas together, a hands on tutorial of modern Perl
    I'd agree with this - say and print are really functions of the I/O layer rather than anything to do with the string itself. Although it might be convenient to have $string->say, this seems to contravene the usual notions of...
  • Commented on You're Wrong!
    I'd like to start by mentioning that I have a lot of respect for your continued efforts to promote Perl and YAPC::NA in particular - even though I'm not planning to attend, the regular articles about sponsorship and the talks/workshops...
  • Commented on Posting Pertama
    As long as it's in some way at least *vaguely* perl related, seems fine to me. Namanya "perl.org", jadi ini tempat untuk orang yang ngebahas perl, atau mau ikut berita tentang perl, atau... wah, apapun, yang penting ada campuran dengan...
  • Commented on Why do you want new major features in core?
    Probably tangential to the main point of your post, but I find UNITCHECK very useful for code that should inject methods only if the calling .pm isn't planning on defining them. package Some::Module; use Module::That::May::Create::Methods; sub implemented { ... }...
  • Commented on Mo supports chained accessors
    Looks handy, although having to specify chain when loading Mo and also for each attribute seems a bit odd - is that for technical reasons? (also, looks like my comment on the previous post never made it through, wasn't particularly...
  • Commented on Mo supports chained accessors
    Looks handy, although having to specify chain when loading Mo and also for each attribute seems a bit odd - is that for technical reasons? (also, looks like my comment on the previous post never made it through, wasn't particularly...
  • Commented on Playing around with Method::Signatures::Simple
    Tried with a 10s fixed benchmark time (-10 as first parameter to cmpthese), to give it a chance to generate stable results: Rate Default Signatures Default 1415342/s -- -2% Signatures 1449838/s 2% -- (perl5.10.1 x64 w/threads, stock Ubuntu10.10 version) Seems...
Subscribe to feed Recent Actions from tommolesworth.myopenid.com

  • Joel Berger commented on Subtle Template Toolkit bug / quiz

    Its for this reason that I like Mojo::Template. There is no new language/syntax to learn, its just Perl. Now I know that's not for everyone, but I like it because I don't have to learn something new.

  • Jerome Eteve commented on Subtle Template Toolkit bug / quiz

    For someone accustomed to Perl, TT is often full of (good or bad) surprises..

    Which is quite unfortunate, given the fact that it's mainly used in Perl based shops.

  • cbt commented on SQLite and Writes

    This is why, when I have an app that uses sqlite, I jump through hoops to avoid opening it more than once. I put blocking 'flock' calls in the 'open' method of my database class. And I have it print a big fat warning message if it blocked. If I have a brain fart and try to open more than once, I get a loud early warning. Before I've caused any failed database updates.

  • https://www.google.com/accounts/o8/id?id=AItOawlsH6xT98cO8R6i25T3JKnyf3im9QgVvvA commented on An example using Mojo::DOM for rewriting HTML

    Hi, I’m curious about Mojo:Dom. Let’s say you want a generic method of traversing a page, and returning a hash of headers and related sub headings and text from a page using Mojo::Dom. The sub text may not necessarily be a descendant of the heading and from what I can tell, mojo::dom can only descend not ascend. How does one construct this? I’ve read the docs and tried a number of things but I’m not getting far :(

  • Joel Berger commented on An example using Mojo::DOM for rewriting HTML

    Hi, I’m not at all sure what you are attempting to do and the comment system of this site does not make it very conducive to technical discussion. I would recommend asking a question on StackOverflow and include the Perl and Mojolicious tags (at least).

Subscribe to feed Responses to Comments from tommolesworth.myopenid.com

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.