Did your post actually contain all the text from Carp? I'm wondering, because I'd expect that the messages would include the string "Can only handle bank accounts right now..." -- when you run the test without "-MCarp=verbose", I'd expect you get just the "Can only handle..." report.

Maybe the part you're confused about is that when you use the "verbose" setting on Carp, the error messages include not only what the module author wants to say but also the full content of @_ as it was passed to the failing subroutine.

So, the string in $data really is being split on "\n" (which really is the same as \x{a}), but the Carp output isn't showing you the results of the split -- it's showing you what args were passed to the subroutine, and (I presume) the error message provided by the author.

If you were to modify the source code, so that the message would be "Can't handle type <<$type>> things, only !Type:Bank", I think the problem would become clear.


In reply to Re: end of the line by graff
in thread end of the line by RandomWalk

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, details, 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, summary, 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.