Hello Shankar, Comments inline below:
On Thu, 2004-02-26 at 07:39, shankar.santhamoorthy wrote: > Hi ALL , > I am quite new to perl... . It would be helpfull if anyone could throw > some light on how to parse xml from an old version of perl on solaris ( > sun4u sparc SUNW,Ultra-2) > > > Perl version 5.005_03 built for sun4-solaris-thread. > > > > cat test.pl > use XML::Simple; > my $config = XMLin('<?xml version="1.0" encoding="UTF-8"?><Request > type="HtmlRetreival"><Parameters><DCNnovalueadd="false">04619379</DCN><Forma > t>html</Format><Highlight>TRUE</Highlight><Snippet > enable="true"><Section></Section></Snippet><Keywords><keyword>COMPUTER</keyw > ord></Keywords></Parameters></Request>'); > use Data::Dumper; > print Dumper($config); > > > > > > The following is the error i getback. > > perl test.pl > Can't locate XML/Simple.pm in @INC (@INC contains: > /usr/local/lib/perl5/5.00503/sun4-solaris-thread > /usr/local/lib/perl5/5.00503 > /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread > /usr/local/lib/perl5/site_perl/5.005 .) at test.pl line 1. > BEGIN failed--compilation aborted at test.pl line 1. > > > Questions : > 1. Can the xml parser libraries be used in the above version of perl > itself. At the code level itsel without any config or env. changes that > need root access - as if root access is needed it becomes a long winding > process as this is a prod. box. > 2. If i can't use the above xml Can i locally install within the userid > scope i am working on. It looks like you are just having the typical problem of the perl binary not the XML module in it's @INC path. You might want to check in /usr/local/lib/perl5 and /usr/local/lib/perl5/site_perl for any other versions of perl installed, or a 'where perl' or 'which perl', to see if there are any other perl binaries installed. Perhaps there is another perl installation on the system that has the XML module. If the system does not have the XML module installed and you do not have root access to install the module, you can install the module in the same directory as your script, though you'll have to create the directories by hand and do the installation manually. You'd have to download and compile/build the XML module, then create the necessary directories and place the appropriate files there. For example: ls -l: XML/Simple.pm XML.pm Something like that. > I tried installing ActivePerl (ActivePerl-5.8.3.809), and it was > throwing following errors > > Installing ActivePerl, please wait... > Configuring Perl installation at /home/iplanet/shankar > Can't locate loadable object for module Unicode::String in @INC (@INC > contains: /home/iplanet/shankar/lib/5.8.3/sun4-solaris-thread-multi > /home/iplanet/shankar/lib/5.8.3 > /home/iplanet/shankar/lib/site_perl/5.8.3/sun4-solaris-thread-multi > /home/iplanet/shankar/lib/site_perl/5.8.3 > /home/iplanet/shankar/lib/site_perl .) at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/PPD.pm line 261 > Compilation failed in require at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/PPD.pm line 261. > BEGIN failed--compilation aborted at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/PPD.pm line 261. > Compilation failed in require at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/Repository.pm line 5. > Compilation failed in require at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/UI.pm line 5. > BEGIN failed--compilation aborted at > /home/iplanet/shankar/lib/site_perl/5.8.3/PPM/UI.pm line 5. > Compilation failed in require at /home/iplanet/shankar/bin/ppm3-bin line 19. > Generating HTML documentation, this may take several minutes... Are you trying to install ActivePerl as a user into your home directory structure? I'm not sure if this will work not not, as I haven't tried it before. Looks like the above compile is only throwing back the single error of not being able to find the Unicode::String module, though I don't know if it is expecting that to be installed in the host system or not. Seems silly if it would require a module that it didn't ship with. You may want to search through the installation source for any file or directory called "Unicode" and see if it is there but just not finding it. > Thanks in advance > > > -regards > shankar -- Justin Hopper <[EMAIL PROTECTED]> UNIX Systems Engineer BSDHosting.net Hosting Division of Digital Oasys Inc. http://www.bsdhosting.net _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs