Brethern,

Thanks for the helpful replies. It took me a little while to interpret some of it correctly, so I herein post my trouble for anybody else who is trying to do the same.

The -I suggestion was very helpful, but I was not having any joy trying to give it two directories to add to @INC. The Camel doc told me that it was preferable to use lib in the script instead of -I in the call to Perl. Did that. I am editing Grapher.pm in the Module::Dependency CPAN module. I have it sitting in /home/throop/perl/Module-Dependency-1.86/lib/Module/Dependency/Grapher.pm Naively, I entered the code:

use lib qw(/home/throop/perl/Module-Dependency-1.86/lib/Module/Depende +ncy);
which didn't work. The Module/Dependency in the string was the culprit. Perl went looking for /home/throop/perl/Module-Dependency-1.86/lib/Module/Dependency/Module/Dependency/Grapher.pm, didn't find it, quit. What worked was
use lib qw(/home/throop/perl/Module-Dependency-1.86/lib);
letting Perl transmogrify Module::Dependency::Grapher into Module/Dependency/Grapher.pm

As for the wisdom of modifying CPAN module code — point taken. I wrote the maintainer with some queries and he noted that the particular section of the code that I need hasn't received much loving for a long time; asked me to update it. I may do that; I'm having discussions with my employer. I know about forgiveness and permission but I'm wish to be careful and scrupulous.

throop


In reply to Re: Editing files in a module by throop
in thread Editing files in a module by throop

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.