What makes you think it's being found? It certainly doesn't look like it is.

Because I read the logs that I posted :) To be fair, at first I thought the same thing. However the logs are a 'stack trace' of sorts. They go from the most recent subroutine called to the oldest, top to bottom. This means if you read from the bottom, you can follow the calls the programs made. Now look at this excerpt:

base::import('base', 'Quantum::Superpositions::Conj') called at /usr/l +ocal/share/perl/5.6.1/Quantum/Superpositions.pm line 350 Quantum::Superpositions::Conj::True::BEGIN() called at Quantum +/Superpositions/Conj.pm line 0

This shows that Quantum::Superpositions::Conj::True called a  use base 'Quantum::Superpositions::Conj';. For this to be possible, Quantum::Superpositions::Conj::True had to be found and loaded.

The next step (up) is where it all goes wrong. import gets called from 'base' (wherever that is), asking for 'Quantum::Superpositions::Conj'. However there is no Conj.pm file, it is a package in Superpositions.pm.

The silly thing is that to get to Quantum::Superpositions::Conj::True, perl had to read through Quantum::Superpositions::Conj to get to it! A check of line numbers confirms that perl did in fact execute the module Quantum::Superpositions::Conj::True correctly.

You are correct in saying that perl is not finding the module, but this is not because the module is not there. It has already found and executed them once! It's the second time through, to fulfil the 'use base' calls that is throwing the errors.

____________________
Jeremy
I didn't believe in evil until I dated it.


In reply to Re: Re: Package module inclusion weirdness by jepri
in thread Package module inclusion weirdness by jepri

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.