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: Beginner:
Interesting question about POSIX

 



digioleg54
User

May 15, 2017, 8:18 AM

Post #1 of 7 (1566 views)
Interesting question about POSIX Can't Post

When I had

Code
 use POSIX;

I had an error that Posix.xs not loaded. Now I changed

Code
 use POSIX();

and everything is working fine. Could you let me know why? Or I still have problems with Perl?

Thanks


Laurent_R
Veteran / Moderator

May 15, 2017, 9:50 AM

Post #2 of 7 (1556 views)
Re: [digioleg54] Interesting question about POSIX [In reply to] Can't Post

It does not sound very good to me.

For one,


Code
use POSIX;


should not raise any error.

If you add empty parentheses, then I think (and cannot test right now to confirm) the effect is that you will probably not import any of the functions that the POSIX module usually exports. That isn't very useful.


FishMonger
Veteran / Moderator

May 15, 2017, 10:00 AM

Post #3 of 7 (1555 views)
Re: [digioleg54] Interesting question about POSIX [In reply to] Can't Post

What is the exact and complete error message?

What other modules are you loading and in what order?

It sounds like you might have a conflict with one of the other modules.


digioleg54
User

May 15, 2017, 10:09 AM

Post #4 of 7 (1553 views)
Re: [Laurent_R] Interesting question about POSIX [In reply to] Can't Post

This is what I found in POSIX tutorial


Code
Everything is exported by default (with a handful of exceptions). This is an unfortunate backwards compatibility feature and its use is strongly discouraged. You should either prevent the exporting (by saying use POSIX (); , as usual) and then use fully qualified names (e.g. POSIX::SEEK_END ), or give an explicit import list. If you do neither and opt for the default (as in use POSIX; ), you will import hundreds and hundreds of symbols into your namespace.



digioleg54
User

May 15, 2017, 10:12 AM

Post #5 of 7 (1552 views)
Re: [FishMonger] Interesting question about POSIX [In reply to] Can't Post

In 'dteacl_b.pl we have



Code
  
use POSIX;
use Digest::MD5 qw(md5_hex); # perl5.8 build-in
use DBI;


and error, when we involve this script sais


Code
POSIX.xs has failed to load



FishMonger
Veteran / Moderator

May 15, 2017, 10:28 AM

Post #6 of 7 (1550 views)
Re: [digioleg54] Interesting question about POSIX [In reply to] Can't Post

No conflict with those modules.

I recall that in some of your prior questions you said that you installed your modules (even some of the core modules) by simply copying them to your private lib directory instead of using the normal install process.

Did you do that with the POSIX module? If so, that would explain why you're having this problem.


digioleg54
User

May 15, 2017, 10:30 AM

Post #7 of 7 (1548 views)
Re: [FishMonger] Interesting question about POSIX [In reply to] Can't Post

No, POSIX goes with Perl 5.22 installation. I don't install it manually

Thanks

 
 


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

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