CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm

 



rupesht
New User

Dec 2, 2012, 11:57 AM

Post #1 of 5 (3498 views)
perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm Can't Post

Perl is able to find module XML/LibXML/SAX.pm but not able find another module XML/LibXML/Literal.pm from same directory.Even @INC paths shows its path /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi.

What is could be the reason for this? I am getting following error.



Can't locate XML/LibXML/Literal.pm in @INC (@INC contains: /html/base/perl_lib /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/Number.pm line 5.

BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/Number.pm line 5.

Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/Boolean.pm line 5.

BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/Boolean.pm line 5.

Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/NodeList.pm line 5.

BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/NodeList.pm line 5.

Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML.pm line 13.

BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML.pm line 13.

Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/SAX.pm line 10.

BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/LibXML/SAX.pm line 10.

Compilation failed in require at /base/my_LIB1/my_common_module1.pm line 19.

BEGIN failed--compilation aborted at /base/my_LIB1/my_common_module1.pm line 19.

Compilation failed in require at /Applications/bin/my_script.pl line 18.

BEGIN failed--compilation aborted at /Applications/bin/my_script.pl line 18.



I am having package versions perl-5.8.5-57,perl-XML-LibXML-1.58-3.el4 and libxm2 version 2.6.16-12.9 on rhel 4.Errors are occurring, intermittently when calling a perl script through a C program multiple times.



Regards

Rupesh


rovf
Veteran

Dec 4, 2012, 1:58 AM

Post #2 of 5 (3453 views)
Re: [rupesht] perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm [In reply to] Can't Post


Quote
Perl is able to find module XML/LibXML/SAX.pm but not able find another module XML/LibXML/Literal.pm from same directory.


Are you sure that Perl picks up SAX.pm from that directory that you think it does? With other words: If you do on the shell a


Code
# bash/ksh/zsh syntax used here 
ls $(dirname $(perldoc -l XML::LibXML::SAX))


do you see Literal.pm?

BTW, I notice that you are using a very old Perl version. Do you have a chance to try your application with a newer Perl?


rupesht
New User

Dec 7, 2012, 2:08 AM

Post #3 of 5 (3358 views)
Re: [rovf] perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm [In reply to] Can't Post

Yes, this command listing Literal.pm.

Just note that this problem is not occurring intermittently when run multiple times and I am calling this script from external program(c program).


rovf
Veteran

Dec 7, 2012, 3:42 AM

Post #4 of 5 (3354 views)
Re: [rupesht] perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm [In reply to] Can't Post

... which suggests that the environment is different (or a different Perl is pulled in). I guess you call the script from within C via system("...")? How exactly does the invocation from the C program looks like?

I would verify then the environment also via system("....").

Also, make sure that the invocation does not implicitly source some dotfiles from your home, which might change the environment.


rupesht
New User

Dec 11, 2012, 4:47 AM

Post #5 of 5 (3179 views)
Re: [rovf] perl is able to find XML/LibXML/SAX.pm but not able XML/LibXML/Literal.pm [In reply to] Can't Post

I am invocing perl via popen(), I did not see any difference in enviroment variable @INC via popen().

If it was environment issue, it would happen each time , it is happening intermittently after script is run fro multiple time.

But for me issue is RESOLVED. I increased the frequency of closing unused connections to my program(they were few hundreds), I believe it reduced my process size reduced. Don't know how it created/resolved perl module load issue.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives