in reply to Re^2: Using a module under VMS
in thread Solved - Using a module under VMS

Hi , another AM with another suggestion, try like this

perl -Ivmsdirhere -MModulename -e 1

If you can't get that working, try

require 'vmsdirhere/Modulename.pm';

An error should pop, and you should be able to figure it out ... do you have use feature qw/ say /; or equivalent (if thats the issue)?

Replies are listed 'Best First'.
Re^4: Using a module under VMS
by Anonymous Monk on May 28, 2015 at 09:21 UTC

    hah, never mind, just saw Re: Solved - Using a module under VMS

    case insensitive filesystems and case sensitive programming languages ... strict.pm/warnings.pm checks for this ... but they're important

    # Verify that we're called correctly so that strictures will work. unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # Can't use Carp, since Carp uses us! my (undef, $f, $l) = caller; die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); }
Re^4: Using a module under VMS
by Laurent_R (Canon) on May 28, 2015 at 09:32 UTC
    Thank you for your very interesting suggestion, other Anonymous Monk, but as I said below, I succeeded to make it work. As noted below, while trying to solve the first issue (the path to the dir), I made the mistake of changing the module name to all-uppercase in my use module; statement, so that, in the end, once having solve the path problem, the module would load correctly, but the package would no longer be recognized. I have now solved it by putting it back to use VMS_utils;.

    As for the say, I am stuck on VMS with Perl 5.8, so that feature does not exists. I just wrote my own version of say in the module. The fact that it did not recognized say indicated in fact that the package was not being recognized.

    Thanks anyway for your help.

    Update: Ooops, I had not seen your second answer when I wrote the above, or probably it was not yet there when I loaded the page and decided to answer.