in reply to Simple perl question
Another approach to this issue:
Isn't Date::Calc in core? It should be available with your standard perl installation, regardless you use Linux or M$-Dog or something else.
If it is not there for any strange reasons consider this (after download in the unpacked src directory of Date::Calc):
perl Makefile.PL PREFIX=/path/to/your/libSay then:
make && make test && make install
Then, in your app say:
use lib q(/path/to/your/lib); use Date::Calc;
And i can't see any security problems installing modules as root. How else should this be done in the default places?. E.g. on my Mac:
Karls-Mac-mini:~ karl$ perl -e 'print join(qq(\n), @INC);' /sw/lib/perl5 /sw/lib/perl5/darwin /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 # and many more...
And:
Karls-Mac-mini:~ karl$ ls -hlrt /Library/Perl/5.12 total 216 -r--r--r-- 1 root wheel 31K 26 Feb 2011 PPI.pm -rw-r--r-- 1 root wheel 33B 11 Okt 2011 AppendToPath -r--r--r-- 1 root wheel 543B 4 Apr 2012 oo.pm -r--r--r-- 1 root wheel 20K 18 Jun 13:32 Carp.pm -r--r--r-- 1 root wheel 8,9K 9 Sep 03:15 strictures.pm -r--r--r-- 1 root wheel 946B 11 Sep 20:24 ok.pm -r--r--r-- 1 root wheel 23K 23 Okt 17:27 Moo.pm drwxr-xr-x 3 root wheel 102B 27 Okt 13:46 B drwxr-xr-x 7 root wheel 238B 27 Okt 13:48 DateTime # and many more...
As you can see everything belongs to root:wheel but the rest can use it anyway. This is the default: Stuff belongs to root:wheel in that directories but is used under your UID if you call it.
A thing one might think about is: I don't want to mess up my default @INC. Then use PREFIX as described above.
BTW: Consider to take a look at Datetime. And trust toolic.
As always, i hope i didn't miss something.
Regards, Karl
P.S.: I did something wrong, s***t. If installing as root, make install as root , or root does it himself, sorry for that - sink before you type ;-)