| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | #!/usr/bin/perl -w | 
| 2 | 1 |  |  | 1 |  | 242780 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 63 |  | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 1 |  |  | 1 |  | 521 | use Test::More tests => 6; | 
|  | 1 |  |  |  |  | 14850 |  | 
|  | 1 |  |  |  |  | 6 |  | 
| 5 | 1 |  |  | 1 |  | 1115 | use Test::Exception; | 
|  | 1 |  |  |  |  | 2853 |  | 
|  | 1 |  |  |  |  | 4 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 | 1 |  |  | 1 |  | 459 | use lib "../lib"; | 
|  | 1 |  |  |  |  | 685 |  | 
|  | 1 |  |  |  |  | 4 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 1 |  |  | 1 |  | 83454 | use_ok("Devel::PerlySense::Util"); | 
|  | 1 |  |  |  |  | 365 |  | 
|  | 1 |  |  |  |  | 38772 |  | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 42 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  |  | 
| 13 | 1 |  |  |  |  | 259 | my @aParam; | 
| 14 | 1 |  |  |  |  | 2 | my %hArg; | 
| 15 | 1 |  |  |  |  | 1 | my @aResult; | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 1 |  |  |  |  | 3 | @aParam = ("file", "row", "col"); | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 1 |  |  |  |  | 3 | %hArg = (file => "dsf", row => 32, col => 34); | 
| 21 | 1 |  |  | 1 |  | 8 | lives_ok( sub { @aResult = Devel::PerlySense::Util::aNamedArg(\@aParam, %hArg) }, "All args there"); | 
|  | 1 |  |  |  |  | 28 |  | 
| 22 | 1 |  |  |  |  | 207 | is_deeply(\@aResult, ["dsf", 32, 34], " Correct return values"); | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 1 |  |  |  |  | 615 | %hArg = (row => 32, col => 34); | 
| 25 | 1 |  |  | 1 |  | 9 | throws_ok( sub { @aResult = Devel::PerlySense::Util::aNamedArg(\@aParam, %hArg) }, qr/Missing argument \(file\)/, "Dies on missing file arg"); | 
|  | 1 |  |  |  |  | 18 |  | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  |  | 
| 28 | 1 |  |  |  |  | 1410 | %hArg = (file => "dsf", row => 32, col => 34, extra => "all"); | 
| 29 | 1 |  |  | 1 |  | 6 | lives_ok( sub { @aResult = Devel::PerlySense::Util::aNamedArg(\@aParam, %hArg) }, "All args there, plus some"); | 
|  | 1 |  |  |  |  | 25 |  | 
| 30 | 1 |  |  |  |  | 204 | is_deeply(\@aResult, ["dsf", 32, 34], " Correct return values"); | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | __END__ |