Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

XMLin() not finding XML::SAX or XML::Parser modules Problem
Hi,
XMLin() requires either XML::SAX or XML::Parser at line number blah blah.
I actually copied these two perl modules in the right place but still then
my script is not able to find these.(in @INC).

I'm trying to call this XMLin() function from another perl module.

Am i missing anything here? Any pointers?


Thanks a ton
-Ajey


Report this thread to moderator Post Follow-up to this message
Old Post
Ajey Kulkarni
09-23-04 08:56 PM


Re: XMLin() not finding XML::SAX or XML::Parser modules Problem
On Thu, 23 Sep 2004, Ajey Kulkarni wrote:

> XMLin() requires either XML::SAX or XML::Parser at line number blah blah.
> I actually copied these two perl modules in the right place but still then
> my script is not able to find these.(in @INC).

What is XMLin() ?

Ahh, I see, it's a method provided by XML::Simple:

<http://www.perldoc.com/perl5.6.1/li...mple.html#XMLin()>

Ok, so, how did you get XML::Simple installed without one or the other
of the two required modules? Did you manually copy, or `force install`?

It sounds like all three modules may be out of whack.

The easiest approach is to install them all with the CPAN shell.

$ sudo perl -MCPAN -e shell

If you haven't run this before, you will spend the next five minutes or
so answering questions about your environment. In most cases, you can
just hit enter to accept the defaults that are suggested to you.

Once setup is complete, the shell launches with a

cpan>

prompt. You need to install one of the prerequisites, then XML::Simple :

cpan> install XML::Parser
cpan> install XML::Simple

Once these complete, programs using XML::Simple methods such as XMLin()
should begin to work normally.



--
Chris Devers

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Devers
09-24-04 01:57 AM


Re: XMLin() not finding XML::SAX or XML::Parser modules Problem
Please send all replies to the list, not me directly. Thanks.

On Thu, 23 Sep 2004, Ajey Kulkarni wrote:

> Thanks a bunch Chris. I FORCED the pms to be copied.
> I'll try to install this and get it running.

It usually isn't a good idea to force an install unless you understand
what the error you're getting means and are confident that in a given
case it can be safely ignored.

In this case, the README file is clear that you need to have one of the
two modules you noted in order for things to work. If you skip that
step, then, well, things won't work.

On the bright side, you probably don't have to reinstall XML::Simple;
once the support module[s] is/are in place, XMLin(...) should work. Or
at least that's what it seems like will happen...


--
Chris Devers

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Devers
09-24-04 01:57 AM


Re: XMLin() not finding XML::SAX or XML::Parser modules Problem
I installed the expat libs,but the cpan shell is now asking
for EXPATLIBPATH and EXPATINCPATH.

It says

perl Makefile.PL <path_to_libraries>

Now,how do i specify these paths for XML::Module installation??

Where is this Makefile.PL file?

Regards again
-Ajey


On Thu, 23 Sep 2004, Chris Devers wrote:

> Please send all replies to the list, not me directly. Thanks.
>
> On Thu, 23 Sep 2004, Ajey Kulkarni wrote:
> 
>
> It usually isn't a good idea to force an install unless you understand
> what the error you're getting means and are confident that in a given
> case it can be safely ignored.
>
> In this case, the README file is clear that you need to have one of the
> two modules you noted in order for things to work. If you skip that
> step, then, well, things won't work.
>
> On the bright side, you probably don't have to reinstall XML::Simple;
> once the support module[s] is/are in place, XMLin(...) should work. Or
> at least that's what it seems like will happen...
>
>
> --
> Chris Devers
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Ajey Kulkarni
09-24-04 08:59 PM


Re: XMLin() not finding XML::SAX or XML::Parser modules Problem
On Fri, 24 Sep 2004, Ajey Kulkarni wrote:

> I installed the expat libs,but the cpan shell is now asking
> for EXPATLIBPATH and EXPATINCPATH.

Oh. That. Yeah, that's a pain.

The first thing is to get Expat installed, which I forgot about before.
Instructions for this will vary depending what OS you're running on. The
docs for whichever of XML::SAX or XML::Parser you're going with may have
more notes to go by here.

Once Expat is installed, you need to set those variables for Perl to use
while building. The two ways I can think of doing this are:

* set them before launching the CPAN shell with one of these methods:

$ sudo perl -MCPAN -e shell EXPATLIBPATH=... EXPATINCPATH=...

or

$ export EXPATLIBPATH=...
$ export EXPATINCPATH=...
$ sudo perl -MCPAN -e shell

(Note that if you use csh/tcsh, it's `setenv FOO "bar"` instead.)

* or, run the CPAN shel to download, then open a subshell to build:

$ sudo perl -MCPAN -e shell
cpan> get XML::Parser
cpan> look XML::Parser
# perl Makefile.PL EXPATLIBPATH=... EXPATINCPATH=...
# make && make test && make install

I can be more specific if I know what operating system you're running
and which Unix shell (bash, tcsh, etc) you're using, but in general the
approach will be along these lines.



--
Chris Devers

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Devers
09-24-04 08:59 PM


Re: XMLin() not finding XML::SAX or XML::Parser modules Problem
> On Fri, 24 Sep 2004, Ajey Kulkarni wrote:
> 
>
> Oh. That. Yeah, that's a pain.
>
> The first thing is to get Expat installed, which I forgot about before.
> Instructions for this will vary depending what OS you're running on. The
> docs for whichever of XML::SAX or XML::Parser you're going with may have
> more notes to go by here.
>
> Once Expat is installed, you need to set those variables for Perl to use
> while building. The two ways I can think of doing this are:
>
>  * set them before launching the CPAN shell with one of these methods:
>
>    $ sudo perl -MCPAN -e shell EXPATLIBPATH=... EXPATINCPATH=...
>
>    or
>
>    $ export EXPATLIBPATH=...
>    $ export EXPATINCPATH=...
>    $ sudo perl -MCPAN -e shell
>
>    (Note that if you use csh/tcsh, it's `setenv FOO "bar"` instead.)
>
>  * or, run the CPAN shel to download, then open a subshell to build:
>
>    $ sudo perl -MCPAN -e shell
>    cpan> get XML::Parser
>    cpan> look XML::Parser
>    # perl Makefile.PL EXPATLIBPATH=... EXPATINCPATH=...
>    # make && make test && make install
>

In the case of using CPAN you can temporarily (or permanantly) set these
options using:

> o conf makepl_arg "EXPATINCPATH=... EXPATLIBPATH=..."

If you have other arguments to Makefile.PL you don't want to clobber
them so they will have to be set in the above too. To see what is
already configured just issue,

> o conf

By itself. You can reset makepl_arg back to empty once the module is
installed, though I would be surprised if it mattered. If you want to
keep them as permanant settings, issue,

> o conf commit

Before closing your session.

> I can be more specific if I know what operating system you're running
> and which Unix shell (bash, tcsh, etc) you're using, but in general the
> approach will be along these lines.
>
>
>
> --
> Chris Devers
>

http://danconia.org


Report this thread to moderator Post Follow-up to this message
Old Post
Wiggins d Anconia
09-24-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:21 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.