Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I recall that once I've seen somewhere description of one undocumented(?) Perl feature which allows to do wierd things like loading Perl modules with use from, say, ZIP archive.

It is possible to put reference on subroutine in @INC and this subroutine will be called when Perl module is used (or required). This subroutine could implement loading of Perl modules from ZIP archive for example. Unfortunately I could not find description what interface should have such subroutine. That is what arguments are passed to it, what should this subroutine return, etc.

To prove that I'm not dreaming I wrote simple test script:

BEGIN { unshift @INC, sub { print "@_\n"; return }; } use Cwd;
It does print something which proves that subroutine reference in @INC does have some special meaning:
CODE(0x8116490) CODE(0x8116490) CODE(0x8116490) CODE(0x8116490) CODE(0x8116490) CODE(0x8116490)
Does anybody have more info about it?

Ilya Martynov (

In reply to Subroutine reference in @INC by IlyaM

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (3)
    As of 2018-10-21 12:29 GMT
    Find Nodes?
      Voting Booth?
      When I need money for a bigger acquisition, I usually ...

      Results (119 votes). Check out past polls.