Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
(This is a continuation of XML::Generator problem in mod_perl, now I got rid of all the none relevant info)

I have a module Foo.pm:

package Foo; package Foo::Bar; use base 'Foo'; package Foo::Bar::Test; use base 'Foo::Bar'; 1;
My problem is that the above module loads ok in command line perl, but it fails in mod_perl (failed on the last "use base 'Foo::Bar'", it can't find the class Foo::Bar)

Is there a way to find out what symbols/packages have been loaded before that failed call? I tried the following:

package Foo; package Foo::Bar; use base 'Foo'; print "$_ => $Foo::{$_}\n" foreach keys %Foo::;
which in commandline produces:
Bar:: => *Foo::Bar:: VERSION => *Foo::VERSION Bar:: => *Foo::Bar:: isa => *Foo::isa VERSION => *Foo::VERSION
but in mod_perl, it produces:
Bar:: => *Foo::Bar:: <br> VERSION => *Foo::VERSION <br>
I guess my question is whether this is the right way to see whether the "Foo::Bar" package is loaded, and why mod_perl behaves differently? (perl 5.8.0, mod_perl 1.29, apache1.3.3)

In my real situation, the package is XML::Generator. To complicate the things further, I have another "identical" installation of perl/mod_perl/apache, where this works ok. I guess I'm trying to find out how to figure out what the difference is.


In reply to Packages and symbol tables by johnnywang

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found