Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Comment on

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

The error is:

Could not find in at PerlMonks/NewestNodes.pm line 202
(someone mentioned in chatter getting this same error message) which is happening because this (edited) code does the indicated things:
sub get_and_cache_nodes { my ($self, $url, $update_info)=@_; # $url starts "http://www.perlmonks.org/index.pl?node=" # . "node+query+xml+generator&nodes=47259,"... my $text=$self->getpage($url); # $text ends up "\r\n" if (!defined($text)) { warn "Error obtaining page: $@\n"; return; } # The next regex does nothing $text=~s!<NODE>\s*</NODE>!!g; # This line causes the error: my $tmpxml=XMLin($text, keyattr => { AUTHOR => "+node_id", NODE => "+node_id" }, forcearray => [ 'AUTHOR', 'NODE' ]);
I don't have a cookie set (because I don't like the Tk Chat client "stealing" my XP updates nor having it make it appear like I'm around and paying attention when I'm probably busy doing other things) so my next task was to figure out how to set my login cookie and how to get NewestNodes to use it but not the Tk Chat Client.

Also, I had to set a HOME environment variable before any of this would work. Not all environments have a $ENV{HOME} set so you might want to make the code more portable in that respect.

BTW, I'd still like the split in "New Notes" as even when I get Tk Newest Nodes working, I won't always be using it.

        - tye (but my friends call me "Tye")

In reply to (tye)Re: Newest Notes by Old Thread vs. New Thread by tye
in thread Newest Notes by Old Thread vs. New Thread by tye

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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 drinking their drinks and smoking their pipes about the Monastery: (8)
    As of 2014-12-25 17:24 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (161 votes), past polls