Hello Monks,

I'm having trouble geting an object I have written to do what I want with the AutoLoader module. I have created a new perl module with h2xs -X and have written a number of functions. Whenever I make && make install the module, I can use it and call my object contructor's new method via my $obj = new PackageName without any problems. However, when I modify my code so it includes the following:

use AutoLoader; ## Not importing AUTOLOAD method. sub AUTOLOAD { goto &AutoLoader::AUTOLOAD; }
The code still compiles, but I have errors when I try to call the constructor method:
Can't locate auto/.al in @INC (@INC contains:

My knowledge of how AutoLoader is pretty much limited to what I have read in the perldoc, but if I'm calling the new method, should it be looking for auto/packagname/new.al? And if not, why doesn't this fail whenever I bypass my AUTOLOAD sub and just import the AUTOLOAD method from AutoLoader?


In reply to AutoLoader no longer looks for .al files in the same place when I write my own AUTOLOAD by ehdonhon

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.