in reply to Re: perl function for 'ps' ?
in thread perl function for 'ps' ?

Thanks for your reply. I do know of cpan. I was actually looking for a way to do this without having to install a module. I can't install this on all the boxes I'm auditing.

Replies are listed 'Best First'.
Re^3: perl function for 'ps' ?
by andyford (Curate) on Aug 14, 2006 at 11:22 UTC
    If you can get logged in and run perl or ps, then you might very well be able to install a module in your $HOME directory and use the module from there.
    You have more power than you might think!
    Check out this node.

      Thanks for your suggestion.

      I tried perl Makefile.PL PREFIX=/home/u752359/ProcessTable and that installed fine.

      However my script fails. Here's the start of it:

      #!/usr/bin/perl -w use lib '/home/u752359/ProcessTable'; use Proc::ProcessTable; $t = new Proc::ProcessTable;

      And when I run it:

      $ ./test.pl

      Can't locate Proc/ProcessTable.pm in @INC (@INC contains: /home/u752359/ProcessTable /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at ./test.pl line 5. BEGIN failed--compilation aborted at ./test.pl line 5.

        You will probably find that you want something like use lib '/home/u752359/ProcessTable/lib/perl5'; but you should check the directory structure that was created and set 'lib' to the directory containing the 'Proc' subdirectory.

        /J\