Thanks for the compliment! I am happy to hear that somebody is learning something from this - I actually did too!

I don't know that you will ever need to use Linux::Inotify2 or not. But, you may need to install some other module on your Linux system without root permission. Here's how I did it... Keep in mind that I am using a student account which has the lowest permission levels on the planet!

I started with looking at the tutorials: don't have permission?. The first step is to make the directory that your "private Perl library" will reside in. I just used the suggested name of "lib".

Now things diverge a bit from the tutorial.. I just typed "cpan" at the command prompt. That was already a command and I didn't have to do anything special. This will create a .cpan directory and start asking a bunch of questions (in UNIX a file name that beings with "." is a "hidden file" - so you will have to use "ls -al" or some such to see it in a directory listing).

When this dialog gets to a question about PREFIX, that's where you type in "PREFIX=~/lib LIB=~/lib", re:the tutorial. I think all of the other defaults were ok on my test machine except for the question about mirrors, enter one or more mirror sites specified by number - otherwise just hit enter.

I didn't see this in the tut, probably there but I missed it. However, I found that I needed to set the PERL5LIB environment variable to get the 'install Linux::Inotify2' command to work from the cpan application. The "make" needs to find common/sense.pm

This student account uses the bash shell, so I modified the file .bash_profile by adding:
PERL5LIB=$HOME/lib:$HOME/lib/common
export PERL5LIB
at the end of it.
This results in:
[tmp2604@mymachine~]$ env | grep -i Perl
PERL5LIB=/home/student/tmp2604/lib:/home/student/tmp2604/lib/common

I don't know if adding /common to the path was necessary or not - at the time I didn't worry about it and actually I'm still not worried about it - searching will stop once "make" finds what it needs.

At the end of the day, installing this special module wasn't THAT hard. I had to mess around a bit, but it works.


In reply to Re^3: Linux::Inotify2, adding sub-dirs to watches event-triggered... by Marshall
in thread Linux::Inotify2, adding sub-dirs to watches event-triggered... by Tinkster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.