Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: How to write testable command line script?by thechartist (Monk) |
on Nov 21, 2018 at 01:40 UTC ( [id://1226091]=note: print w/replies, xml ) | Need Help?? |
I appreciate your effort but this is my confusion: The script works correctly at the command line and does not issue any warnings, despite use of the strict and warnings pragmas enabled. It is only when I try to run it using automated test tools do those warnings arise. Example: If I simply call reduce with 1 argument at the command line, it will be pushed onto the @answer array and returned. This tells me that the instantiation errors are in the way the test code interfaces with the code under test. I don't understand why the arguments aren't being passed to the appropriate subroutine. If I attempt to pass a list of scalar arguments in the test code, I get syntax errors when I run:
Also:
In Section
Seekers of Perl Wisdom
|
|