Professional Web Applications Themes

XMLin() not finding XML::SAX or XML::Pr modules Problem - PERL Beginners

Hi, XMLin() requires either XML::SAX or XML::Pr 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...

  1. #1

    Default XMLin() not finding XML::SAX or XML::Pr modules Problem

    Hi,
    XMLin() requires either XML::SAX or XML::Pr 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

    Ajey Guest

  2. #2

    Default Re: XMLin() not finding XML::SAX or XML::Pr modules Problem

    On Thu, 23 Sep 2004, Ajey Kulkarni wrote:
     

    What is XMLin() ?

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

    <http://www.perldoc.com/perl5.6.1/lib/XML/Simple.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::Pr
    cpan> install XML::Simple

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



    --
    Chris Devers
    Chris Guest

  3. #3

    Default Re: XMLin() not finding XML::SAX or XML::Pr modules Problem

    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
    Chris Guest

  4. #4

    Default Re: XMLin() not finding XML::SAX or XML::Pr 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:
     
    >
    > 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
    >
    >[/ref]

    Ajey Guest

  5. #5

    Default Re: XMLin() not finding XML::SAX or XML::Pr 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::Pr 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::Pr
    cpan> look XML::Pr
    # 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
    Chris Guest

  6. #6

    Default Re: XMLin() not finding XML::SAX or XML::Pr 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::Pr 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::Pr
    > cpan> look XML::Pr
    > # perl Makefile.PL EXPATLIBPATH=... EXPATINCPATH=...
    > # make && make test && make install
    >[/ref]

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

    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,
     

    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,
     

    Before closing your session.
     

    http://danconia.org

    Wiggins Guest

Similar Threads

  1. XML::Simple XMLIn() and odd chars
    By dr in forum PERL Modules
    Replies: 13
    Last Post: August 6th, 02:52 PM
  2. Finding installed modules
    By Bernie in forum PERL Modules
    Replies: 3
    Last Post: January 9th, 03:34 PM
  3. Problem using XML-Pr
    By George C. Demetros in forum PERL Modules
    Replies: 0
    Last Post: September 25th, 09:20 PM
  4. Problem with xml pr
    By debraj in forum PERL Miscellaneous
    Replies: 1
    Last Post: September 15th, 09:57 PM
  5. Installing own copy of modules - problem finding them
    By Alan J. Flavell in forum PERL Modules
    Replies: 5
    Last Post: August 11th, 08:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139