Either that, or I'm going nuts.
I've been adding a test suite to our app. Everything's going smoothly. Then I try an install and I get an error. I write a minimal test case for it. Error is:
F/Ast/Action.pm did not return a true value at tmp.pl line 4. BEGIN failed--compilation aborted at tmp.pl line 4.
line 4 is the use statement loading the module. So, I take a look at it. It ends in a "1;" on it's own line.
perl -c F/Ast/Action.pm gives no errors or warnings.
So I start ripping out subs to create a minimal case. I end up with this:
package F::Ast::Action; use Switch; use strict; use warnings; =over 4 =item constants =back =cut sub new { return bless [], shift; } sub doCmd { my $self = shift ; my $cmd = shift ; switch ($cmd) { case 'get_permission' {} } } 1;
Here's where it gets weird. If I remove the pod, the test script works fine. If I put it back and remove the doCmd sub, it works just fine. And if I move the module into the same directory as the test script (renaming and amending use statement), it works fine.
I am very, very confused.
Any ideas as to what my sleepy head could be missing? I'm about ready to start headbutting the keyboard...
In reply to Extremely weird module issue... by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |