I have the usual MakeMaker module with a t/ tests directory, and I can run a single test file with e.g., prove -I lib t/my-test.t. My tests use Test: ...
I have the usual MakeMaker module with a t/ tests directory, and I can run a single test file with e.g., prove -I lib t/my-test.t. My tests use Test: ...
Here's a short Perl 6 program that declare a MAIN subroutine. I should only see output if I execute the program directly: And I see output when I e ...
Consider the following basic Perl modulino: If I run it on the command line, I get: If I call it from a test: In other words, the contents of ...
Let's say there's a simple Perl script testme.pl like this: And a test file testme.t like this: Running perl testme.t seems to work as expected, ...
I'd like to write some unit tests for my cgi script. I wrote my script as a modulino (script which could be a module depending on context) and I would ...
I want to make a modulino (a file that can run as either a module or a script) in Perl6. The following code "processes" file names from the command ...
I like to write my scripts as "modulinos", shell scripts that can be called by themselves as little CLI programs, or imported by other programs as lib ...
I know Perl has a design pattern known as a modulino, in which a library module file can act as both a library and a script. Is there any equivalent t ...
I have been toying with the modulino perl pattern and would like to load one without knowing the package name and only the file in which it is. I'm lo ...
I have some scripts that I have started unit-testing using the "modulino" idea. I have encountered a problem in that when the script is called with "p ...
I'm building a perl application as a "modulino" to make testing easier. The directory structure looks something like this: The first test in each . ...
I'm trying to include the unit tests for a module in the same source file as the module itself, following the Perl modulino model. Now, I can run t ...
Let's say I have a Perl file in which there are parts I need to run only when I'm called as a script. I remember reading sometime back about including ...