Thank you for your answer, Anonymous Monk, but yes, I have figured out this caveat on the lib pragma, which is why I tried both these syntaxes:
# use lib ('DISK$ECD:[DMC]'); # does not work use lib 'DISK$ECD/DMC/'; # does not work either
Although the origin of my problem really seems to have something to do with VMS specificities, my question is really more general and not VMS specific: in one case, Perl does not find the module and compilation fails on the use VMS_utils , which is what I would expect. But once I tried to fix that by changing the use lib qw/.../ clause, I no longer have an error on loading the module, so I would assume Perl succeeded to load it, but compilation fails on using the subroutines (e.g. the say function) defined in this module.

So my more general question is: are there some conditions under which Perl does not fail on the use statement loading a module but still does not apparently load the subroutines defined in the module. Knowing that my module is apparently correct, since everything works correctly when both the programs and the module are in the same directory.

Please also note that I have also tried, among many other things, to copy my module into one of the @INC paths, but I still get the compilation error on the use of subroutines defined in the module. This is really puzzling my mind.


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.