We don't bite newbies here... much | |
PerlMonks |
Re^4: Parsing Problemsby ftherese (Novice) |
on May 15, 2019 at 17:47 UTC ( [id://11100033]=note: print w/replies, xml ) | Need Help?? |
Thank you for your reply. This is helpful as I've traced the error to how Perl is handling the modules, @INC, and referencing subroutines. What my code is supposed to do is apply different sets of transformations to a text file based on options specified from the command-line: modes.pl [rawtext] [style] [mode](one, two, etc.) [1st variation](a, a_prime, b, etc.) [2nd variation] "style" is one of several directories containing nine .pm files. Each .pm file has at least the subroutines "first" and "flex." The other subroutines are variations. Here is the code that I'm using to load the modules:
The error that code produces (given: ./modes.pl "filename" english three a b) in Perl 5.26.1 (error does not occur in 5.18.2) is the following:
Setting $lP to the fully qualified PWD (or simply "." since the "english" directory is located here) fixes that error, but the subroutines are still undefined: Undefined subroutine &modes::three::flex I'm not sure why this is. I will change my code based on your recommendations, but I don't understand it well enough myself to do so yet. I borrowed the module loading code from another programmer years ago simply because it did what I needed - I never fully understood it.
In Section
Seekers of Perl Wisdom
|
|