Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Help: Constructors and all things OO.

by IOrdy (Friar)
on Aug 28, 2001 at 17:01 UTC ( [id://108420]=note: print w/replies, xml ) Need Help??


in reply to Re: Help: Constructors and all things OO.
in thread Help: Constructors and all things OO.

As above ++thanks. you where correct about returning the class instead of the blessed object.

And yes I hope for it to work as you have stated above. I do have use strict; and -w (this is where I get the errors from).

As far as I can see there are no problem or spelling mistakes at all. Apart from the obvious that is :)
  • Comment on Re: Re: Help: Constructors and all things OO.

Replies are listed 'Best First'.
Re: Re: Re: Help: Constructors and all things OO.
by MZSanford (Curate) on Aug 28, 2001 at 17:14 UTC
    What i would suggest then, is wittling you code down into just what is needed to add one (hard coded) entry, and print the output (similar to the test code i used above). If this does not work, please post the code and output (messages i mean). If this does work, then start down the "what's diffrent ..." path. This is usually how every debugging sojourn starts.
    can't sleep clowns will eat me
    -- MZSanford
      This is the code I made to call the module iXML::TheConstructor;
      #!/usr/bin/perl -w use lib '/usr/home/iordy/perl.iordy.net'; use strict; use Apache::Request; use iXML::TheConstruct; my $r = Apache->request; my $constuctor = iXML::TheConstruct->new();


      it works up until I add the ref my $r = Apache->request; so I tried it with XML::XPath and HTML::Template and it works fine which leads me to beleive something must be happening with Apache when I use my module. Depending on which I load first with 'use' the other comes up with the error "unable to find method 'new' via Module.".
        sounds like you are on the right track, but just to make sure of something. "unable to find method 'new' via Module" is caused when the .pm file with the module name was loaded, but the new() method could not be found. Usually when i have this, it is because i mis-spelled the package name in the package statement, or some other madness which causes the module to load, but in the wrong namespace. I would double check the module for any problems in the package statement, including missing ;'s. You might even want to check %iXML:: for anything fishey.
        can't sleep clowns will eat me
        -- MZSanford

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://108420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found