Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Keep It Simple, Stupid
 
PerlMonks  

How-to install POSIX.pm

by LeeC79 (Acolyte)
on Sep 09, 2003 at 12:17 UTC ( #289999=perlquestion: print w/ replies, xml ) Need Help??
LeeC79 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to just add the POSIX.pm file to the lib directory and that really isn't working. I'm assuming that it's because this module has to be installed some other way. Could someone steer me in the right direction here? I have the POSIX.pm file, now what? Thanks in advance.

Comment on How-to install POSIX.pm
Re: How-to install POSIX.pm
by BrowserUk (Pope) on Sep 09, 2003 at 12:30 UTC

    The file POSIX.pm is only the perl front end to the file POSIX.XS which is where all the real work is done. To get the POSIX package to wirk requires compileing POSIX.XS.

    However, the POSIX package comes as a part of the core distribution and has done for at least the last 3 or 4 releases. Which version of perl are you using that you need to install this yourself?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

      I realize this is a very stupid question to those of you who use perl on a daily basis. Truth of the matter is, I taught myself Perl last week and I'm still learning. I thought this was a place to come and get help, not be ridiculed. If you don't know the answer to my question, why reply? Why beat around the bush? I know that POSIX comes as part of the core distribution and has for at least 3 or 4 releasess. Simple fact is, our Business Server does not have POSIX installed (it is an older version, and was stripped down when installed). Now I know that POSIX.pm is only the front end to POSIX.xs. I haven't been able to find POSIX.xs. Where can I find it? When I do find it, how do I compile it?

        Ok, the problem is not the age of your Perl version (we established yesterday that 5.004_02 should include POSIX.pm) it's the fact that someone decided to to cripple your installation when it was installed. That's a dangerous game. Once you start messing with a Perl installation all sorts of things can go wrong. That's why I'd urge you to fix the problem by reinstalling Perl from scratch.

        You say that updating the version of Perl is not an option for you. I'd say that using software that is six years old should be even less of an option. I believe that if you check bugtraq then you'll find security advisories against that version of Perl. That should help persuade whoever needs to make the decision that you really should upgrade as soon as possible.

        Having said all of that, the POSIX installation kit for your version of POSIX is here you can download it and use the standard Perl module installation procedures to install.

        But please only use that as a last resort. Please try to install a more recent (and more complete) version of Perl first.

        --
        <http://www.dave.org.uk>

        "The first rule of Perl club is you do not talk about Perl club."
        -- Chip Salzenberg

        You have a crippled installation. Get the admins to reinstall Perl, and now leave it intact. Disk space is cheap nowadays. It may be the same version as they used before, for all I care.

        Or, you can install another version of Perl at another location. Using the shebang line in your script you can use that for your script, and leave the old installation as it is: an almost useless pile of junk.

        p.s. Hmm... people are suggesting that your "Business Server" is using Windows. I didn't know Activestate even had a version of perl5.004... Anyway, shebang lines likely won't work on Windows. Hmm... In that case, associate a different file extension, like ".pl2", with your new installation of perl, and use that extension for your scripts.

        p.p.s. See how useless perl5.004 has become: "The DBI no longer supports Perl <= 5.004"

        The problem is more that you're not telling us how to help you. Which perl version do you have, which system is it running on? (Business Server sounds like Windows NT?). I suspect if you really want to DIY, you're going to have to get the source for perl itself, or the POSIX module (see POSIX), and then compile it. You'll need a working C++ compiler for that.

        You're still better off installing a complete perl, if that's at all possible. ActiveState has nice pre-packaged ones for Windows.

        C.

        Do you know what CPAN is?

        If not, read the documentation that came with your version of perl and learn. Just incase the documentation was also stripped out during installation, then follow this link.

        Then you could follow this link to locate a proper copy of POSIX.

        You might like to find the person that installed perl on your Business server and get him to explain what he did to you -- and then sack him!

        As for the rest of your comments...Good luck!


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
        If I understand your problem, I can solve it! Of course, the same can be said for you.

Re: How-to install POSIX.pm
by liz (Monsignor) on Sep 09, 2003 at 12:36 UTC
    This was already addressed in POSIX.pm and Perl 5.004_02 - Compatible?. Maybe an analogy is in order.

    If you take apart a clock, you end up with a whole lot of small parts. What you are trying to do is put a small part (POSIX.pm) into another clock (your perl installation), without knowing whether that part originally belonged to the clock, is already in there, misses any other parts that it needs in order to work. etc. etc.

    Get a whole, working clock in one piece. It will have all the right parts.

    Liz

      Very nice analogy.
      But if you would have read the whole thread you would see that I mentioned that, the version of Perl on our Business Server DOES NOT HAVE POSIX.pm. Changinig the version of PERL on our Business Server IS NOT AN OPTION.
      I would simply like to know how to install POSIX.pm correctly. I believe that was the question I posted this morning.
        Well, if you don't like any of the suggestions that have been made so far, you might try taking the source POSIX.xs from the source 5.00402 and recompile it. This may involve recompiling other modules to resolve dependencies. But still, technically this will be a "correct" way.

        Look, everyone here wants to help you, but you have a hopeless situation. Perhaps you should try a little harder to convince the management to upgrade Perl on the server to a more modern version (if binary compatibility is a problem, 5.6.1 should be good), or write a script that doesn't use POSIX. For the snippet shown in POSIX.pm and Perl 5.004_02 - Compatible?, this should be easy.

        Changinig the version of PERL on our Business Server IS NOT AN OPTION.
        Sure, people have suggested you upgrade (change the version), but 5.004_02 (apparently the one on your server) is still readily available, so just reinstall it (and I do mean REINSTALL IT).

        I would simply like to know how to install POSIX.pm correctly. I believe that was the question I posted this morning.
        I already answered that at Re: Re: Re: POSIX.pm and Perl 5.004_02 - Compatible?. Did you read perlmodinstall and A Guide to Installing Modules? Were you confused by anything?

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re: How-to install POSIX.pm
by davorg (Chancellor) on Sep 09, 2003 at 12:39 UTC

    If you have to install POSIX.pm then your installation of Perl is either very old or very broken. In both cases you should really consider reinstalling from scratch.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: How-to install POSIX.pm
by Abigail-II (Bishop) on Sep 09, 2003 at 12:54 UTC
    Ladies and Gentlemen, welcome to another episode of guess what am I doing wrong, our daily quiz where the candidates can't be arsed to give any clue about their problem, yet expect to be helped by our panel anyway.

    Candidate number one, what is your name?

    LeeC79

    LeeC79, what is your problem?

    it really isn't working

    LeeC79, can you give us any more hints?

    I'm assuming that it's because this module has to be installed some other way.

    LeeC79, that's a really helpful hint! It's going to be a piece of cake for our panel of Perl wizards.

    Panel, what's your answer? Yes, Master of Regular Expressions, what's your opinion?

    Master of Regular Expressions: Let's see. Yes, I know, I know. LeeC79 hasn't plugged in his computer!

    LeeC79, did you plug in your computer?

    Uhm, yes, I did.

    Our candidate did plug in his computer! The score is now 1-0 for our candidate. Other opinions?

    Pack Wizard: Could it be that LeeC79 is sitting too far from his desk, and that he can't reach the keyboard?

    LeeC79?

    No, I can reach the keyboard just fine.

    Pack Wizard: It was worth a try...

    Sure, but the score is now 2-0 for our candidate.

    XS Specialist: It's clear as water to me. The candidate is trying to install the module and get it working with Python!

    LeeC79, did you try installing with Python?

    No snakes can be found on my computer.

    Any of the other mighty wizards have a clue?

    The Benchmark King: Perhaps the library was installed correctly, but the candidate expected it to do something else.

    No, it isn't working!

    The Benchmark King: How do you know?

    It just doesn't work!

    The Benchmark King: ...?

    Perl wizards, you are out of time. Once again you failed to help a candidate with a very desperate problem.

    Tune in tomorrow, to the next episode of guess what am I doing wrong. Same time, same channnel.

    Abigail

      Could someone knock up a script that turns all of Abigail-IIs posts in the last 24 hours into an RSS feed and host it?
      This stuff is better than coffee.
      Boy, just add Arlene Francis, the $5.00 per question unanswered to the $50 max and you've got a new "What's my Line". I think you might be able to sell it to FOX for the summer season. ;)

      Great work!

      There is no emoticon for what I'm feeling now.

Re: How-to install POSIX.pm
by jeffa (Chancellor) on Sep 09, 2003 at 14:29 UTC
    I'll steer you in the right direction. Don't use POSIX!

    According to POSIX.pm and Perl 5.004_02 - Compatible?, the only reason you appear to need POSIX is for the strftime function. Well, one of my favorite date/time modules, Time::Piece, has a strftime function as well:

    use Time::Piece; print localtime->strftime('%Y%m%d.%H%M%S'); print localtime->strftime('%Y%m%d%H%M%S');
    Note that i have not tried this with Perl 5.004_02, but after looking at the source, i do not see any immediate 'flags' that indicate it won't work.

    Sometimes you just have to sit back and ask yourself "is this really what i need to do, or just what i think i need to do." Please don't disrespect the Monks. If you think we are picking on you, we are not. We are just trying to help. Patience young grasshoper, your problem will be solved. :) (and read How (Not) To Ask A Question for tips on effective and uneffective posting)

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Who We For? (Was: Re: How-to install POSIX.pm)
by Intrepid (Deacon) on Sep 10, 2003 at 04:41 UTC

    What's the Real Problem here?

    Looking over the evolution of this thread, I decided I felt like making some observations about what happened here (besides my laughing myself silly over Abigail-II's comedy). Maybe some of it, humble as it is, might have general applicability.

    The O.P. probably won't stick around to read this, but if he does, I should first point out that I think he got off relatively cheap in the ridicule department.

    The reason I says so is that the O.P. states

    Truth of the matter is, I taught myself Perl last week and I'm still learning. I thought this was a place to come and get help, not be ridiculed.
    The immmense absurdity of the above is reason enough for normal people to find it nearly impossible to take the matter seriously. I taught myself Perl 6 years ago and I've barely begun to learn how to use the language effectively or beautifully. OK, so enough about that. It's painfully obvious to nearly everyone.

    What I think really merits huge ridicule is the other dimension of the arrogance here. The O.P. came up with an idea: "install POSIX.pm by copying it into some [undisclosed] location" and then when it didn't work (of course), he responded to efforts to point out his failure of understanding, with indignation. He came up with an idea that was completely flawed and arbitrary (well, it might have worked if we'd been talking about a simple pure-Perl, stand-alone module) and then remained fixated on it. Anything but read the pertinent Perl documentation, apparently. Or re-examine his thinking process.

    This fiasco of non-help (as seen by him) supplied to this new user provokes us to look, if we care to, at several questions. Some of those might be:

    Considered by holli: leave as it is.
    Unconsidered by planetscape: keep (and edit) votes prevented reaping

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://289999]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-04-19 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (475 votes), past polls