Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

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

You should really format your code better (one indetion level per opneing brace, see perlstyle), it is very hard to read as is. Maybe the problem becomes visible then?

One obvious problem is:

sub scores { my ( $self, @scores )= @_; ... } # and later $node->scores(['3','177','12',]);

The scores method expcets a flat list, but you pass an array reference to it.

Also dubious:

eval{person->new();} or die ($@);

Why catch errors with eval if all you do is rethrowing them?


In reply to Re: Iterating though an array of objects by moritz
in thread Iterating though an array of objects by rjhill

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?
    [choroba]: which usually means its input wasn't handled correctly
    [Corion]: choroba: Yeah, I think that would be the good solution
    [LanX]: I suspect the first string which comes from the DB ...
    [LanX]: ... but this part is already in production for a year now
    [Corion]: LanX: The "good" approach here would be to use the appropriate DBI parameters to make the driver decode strings properly. But that will have a ripple-on effect of messing up all the places where manual decoding happens ;)
    [LanX]: which means albeit being broken UTF8 it'll be handled correctly
    [LanX]: and the problem only occurs since we changed the emails to base64
    [LanX]: my main problem will be to cnvince my colleagues that our productive code is broken oO ... so in the end I will just make a workaround :-/
    LanX hates UTF8 for causing knots in his brain and stomach

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (10)
    As of 2017-01-16 14:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you watch meteor showers?




      Results (150 votes). Check out past polls.