[Bps-public-commit] r18388 - in Shipwright/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Feb 13 23:34:11 EST 2009


Author: sunnavy
Date: Fri Feb 13 23:34:11 2009
New Revision: 18388

Added:
   Shipwright/trunk/lib/Shipwright/Util/
   Shipwright/trunk/lib/Shipwright/Util/CleanINC.pm
Modified:
   Shipwright/trunk/   (props changed)

Log:
 r19845 at sunnavys-mb:  sunnavy | 2009-02-14 12:25:31 +0800
 added Shipwright::Util::CleanINC


Added: Shipwright/trunk/lib/Shipwright/Util/CleanINC.pm
==============================================================================
--- (empty file)
+++ Shipwright/trunk/lib/Shipwright/Util/CleanINC.pm	Fri Feb 13 23:34:11 2009
@@ -0,0 +1,42 @@
+package Shipwright::Util::CleanINC;
+use strict;
+use warnings;
+use Config;
+
+sub import {
+    @INC = (
+        $Config::Config{privlibexp},
+        $Config::Config{archlibexp},
+        $ENV{PERL5LIB} ? split( ':', $ENV{PERL5LIB} ) : (),
+        '.',
+    );
+}
+
+package inc::Shipwright::Util::CleanINC;
+# this file will be copied to inc/ in shipwright's repository
+sub import {
+    Shipwright::Util::CleanINC->import();
+}
+
+1;
+
+=head1 SYNOPSIS
+
+    use Shipwright::Util::CleanINC;
+
+=head1 DESCRIPTION
+
+this will limit the @INC to only contain Core ( technically, they are
+$Config::Config{privlibexp} and $Config::Config{archlibexp} ) and PERL5LIB
+
+=head1 AUTHOR
+
+sunnavy  C<< <sunnavy at bestpractical.com> >>
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright 2007-2009 Best Practical Solutions.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+



More information about the Bps-public-commit mailing list