Author:
erics , April 16th, 2021
The key is to define a variable first, then use the BEGIN block to initialize the variable, then reference the variable in use lib $var; later on ;-} For example, enable a module contained in the same directory as a script called via the PATH:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/ussr/bin/env perl
use strict ;
use warnings ;
our $ scriptPath ;
BEGIN {
eval {
use File :: Basename ;
use File :: Spec ;
$ scriptPath = dirname ( File :: Spec -> rel2abs ( __FILE__ ) ) ;
1 ;
} or do {
die "$0 use CRASHED: $@" ;
} ;
}
use lib $ scriptPath ;
eval {
use MyModule :: ABC ;
1 ;
} or do {
die "$0 use CRASHED: $@" ;
} ;
Categories: How-To's , Technology Tags: @INC , compile , Compile-time , Dir , directory , howto , include , lib , Library , module , Path , perl , require , Run-time , runtime , tips , Use , use lib
| No comments
Author:
erics , May 24th, 2012
Prerequisites: LESS Compiler YUI Compressor Unzip and copy the build/yuicompressor-2.4.7.jar file to a known location. Java runtime Install of this is beyond the scope of this post
/ usr / lib / nodejs / less / bin / lessc yourFile . less > yourFile . css
/ usr / bin / java - jar yuicompressor - 2.4.7.jar yourFile . css - v - o yourFile . min . css -- charset utf - 8
Good luck!
Categories: Technology Tags: compile , Compress , CSS , LESS , Minify , YUI , YUI Compressor
| No comments
Author:
erics , February 25th, 2012
yum install glib2 - devel
yum install fuse - devel
yum install libcurl - devel
wget http : //sourceforge.net/projects/curlftpfs/files/latest/download
tar xvzf curlftpfs - 0.9.2.tar.gz
cd curlftpfs - 0.9.2
. / configure
make
make install
http://curlftpfs.sourceforge.net/
Categories: How-To's , Technology Tags: Amazon , Amazon Linux , AWS , CentOS , compile , configure , Curl , curlftpfs , fuse , glib , howto , make , make install , tips , Yum
| 2 comments
Author:
erics , August 12th, 2011
To get mcrypt support for PHP 5.3, compile and install just the mcrypt extension. First, get the prerequisites:
yum install php53 - devel libmcrypt - devel gcc gcc - c ++
Download the php source code from php.net, for example:
wget http : //mx2.php.net/get/php-5.3.6.tar.bz2/from/us3.php.net/mirror
tar xvjf php - 5.3.6.tar.bz2
Now, cd to the proper place and follow these steps:
cd php - 5.3.6 / ext / mcrypt /
phpize
aclocal
. / configure
make
make install
Create the configuration file for MCrypt /etc/php.d/mcrypt.ini containing:
Restart apache:
Create a file […]
Categories: How-To's , Technology Tags: compile , gcc , howto , Install , libmcrypt , mcrypt , mcrypt.ini , mcrypt.so , php , PHP53 , phpmyadmin , tips
| 2 comments
Author:
erics , November 8th, 2009
USE_NONDEFAULT_X11BASE=1
Categories: How-To's , Technology Tags: compile , FreeBSD , ports , x11
| No comments