Hi
bliako,
I sense that there's a bit you could do to simplify the task.
When I run your script I get:
C:\_32\pscrpt\inline>perl bliako.pl
Case1: @out
ok 1 - Case1: called success.
ok 2 - Case1: rows are 5
not ok 3 - Case1 : item 0 is ARRAYref.
# Failed test 'Case1 : item 0 is ARRAYref.'
# at bliako.pl line 72.
Bizarre copy of ARRAY in list assignment at C:/perl-5.34.0/lib/Test/Bu
+ilder.pm line 802.
# Tests were run but no plan was declared and done_testing() was not s
+een.
# Looks like your test exited with 255 just after 3.
I therefore wonder "why present us with all of the extra stuff that we don't even get to" ?
Much better, IMO, to consider just the part that's not working. (And then, if needed, proceed to the next part that fails to work when we've fixed the first failure.)
Doing a Devel::Peek::Dump of
$out[$i] reveals that it is an array (and not a reference to an array). At least, that's how it looks to me:
ok 1 - Case1: called success.
ok 2 - Case1: rows are 5
SV = PVAV(0x7ae098) at 0x33cab0
REFCNT = 1
FLAGS = ()
ARRAY = 0x2f0d7d8
FILL = 2
MAX = 3
FLAGS = (REAL)
Elt No. 0
SV = IV(0x33cad0) at 0x33cae0
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 42
Elt No. 1
SV = IV(0x33cab8) at 0x33cac8
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 42
Elt No. 2
SV = IV(0x33cb30) at 0x33cb40
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 42
not ok 3 - Case1 : item 0 is ARRAYref.
# Failed test 'Case1 : item 0 is ARRAYref.'
So the test is reporting correctly.
I'm also a bit puzzled about the involvement of Test/Builder.pm. Do you know what it is it that pulls that module in ?
Cheers,
Rob
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.