http://qs321.pair.com?node_id=127879


in reply to Re: Re: Merging XML
in thread Merging XML

Now we have 2 files, but I still have no idea what the resulting "merged" file should look like. It could be:

<Z><A id="a1">...</A><A id="a2">...</A></Z>

which would be quite easy to do, you don't even need Perl for this, but it could also be a file where only D elements are added according to conditions on various tags/attributes...

What system are you trying to install XML::Parser on? Versions up to 2.29 include expat, so all you need is a C compiler, gcc works fine, to install the module. The only problem you can find is that it can collide with the static install of expat done by Apache. So version 2.30 comes without expat, which you have to install (you can find expat on sourceforge here).

Replies are listed 'Best First'.
Re: Re: Re: Re: Merging XML
by artist (Parson) on Nov 28, 2001 at 00:23 UTC
    Ok, I am trying to install XML::Parser once again.. Help me out..
    I would like to install it in ~/lib directory, where I put all my local modules.
    First question is what I should put for makefile.
    perl Makefile.PL ????

    Thanks,
    Artist
      perl Makefile.PL PREFIX=~

      This installs module stuff in ~/lib/ and binaries that ship with a module into ~/bin/, things like that. You can also use LIB=~/lib if you're just concerned about getting the module itself in the right place (which is usually sufficient for simple modules).

      See ExtUtils::MakeMaker for more interesting tidbits about the Makefile.PL that ships with standard module installations.

Re: XML::Parser installation
by artist (Parson) on Nov 28, 2001 at 01:40 UTC
    I need perl for the same as this is going to be automatic.
    I successfully installed XML::Parser using PREFIX=~
    When I am trying to install other modules, it looks for @INC as defined by the system and cannot find the modules I just installed. How do I change that..
    Thanks..
    Artist

      You can do this on a per-script basis using use lib, as Fastolfe suggests, or you can set the environmental variable PERL5LIB to the desired directory, and it will be set for all your scripts (do it in your .login or .tcshrc file to keep from having to reset it every time, obviously).



      If God had meant us to fly, he would *never* have given us the railroads.
          --Michael Flanders

      use lib '/some/other/dir';