in reply to Get Semaphore info using CPAN semaphore.pm

  1. Read http://perldoc.perl.org/Thread/Semaphore.html
  2. Write code
  3. Test, noting any failures, errors, etc
  4. Update OP with info from above

We can offer better help (and speed your learning process) when you, yourself, try to work out your problem.

  • Comment on Re: Get Semaphore info using CPAN semaphore.pm

Replies are listed 'Best First'.
Re^2: Get Semaphore info using CPAN semaphore.pm
by rmv (Initiate) on Sep 05, 2009 at 13:34 UTC

    I donot have root access on our system. And I got the below error. Please let me know how I can work with semaphores without installing any thing.

    perl Semphore_try.pl Can't locate Thread/Semaphore.pm in @INC (@INC contains: /usr/perl5/5. +8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/ +5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_p +erl /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int /usr/perl5/vendor +_perl/5.8.4 /usr/perl5/vendor_perl .) at Semphore_try.pl line 1. BEGIN failed--compilation aborted at Semphore_try.pl line 1.

    I have the source code of semaphore.pm . May be I need to try using it directly from IPC , instead of using threaded ones. Please guide me .

      try...
      1. Installing the CPAN library (and any missing dependencies) into a directory you can write to e.g. somewhere in your home directory, most easily achieved by using perl -MCPAN -e shell and then install semaphore
      2. Modify $PERL5LIB or %PERL5LIB% to point to the installation directory
      3. Re-run your script
      A user level that continues to overstate my experience :-))

        Well I am not autorized to install and there is some process involved and its tedious.

        Please let me know how I can achieve my results by trying to use the source code for semaphore.pm from CPAN without installing it.