[Bps-public-commit] r10395 - in RT-Extension-AttributeWalker: inc/Module inc/Module/Install

falcone at bestpractical.com falcone at bestpractical.com
Fri Jan 18 12:51:59 EST 2008


Author: falcone
Date: Fri Jan 18 12:51:58 2008
New Revision: 10395

Modified:
   RT-Extension-AttributeWalker/   (props changed)
   RT-Extension-AttributeWalker/META.yml
   RT-Extension-AttributeWalker/inc/Module/Install.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Base.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Can.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Fetch.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Makefile.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Metadata.pm
   RT-Extension-AttributeWalker/inc/Module/Install/RTx.pm
   RT-Extension-AttributeWalker/inc/Module/Install/Win32.pm
   RT-Extension-AttributeWalker/inc/Module/Install/WriteAll.pm

Log:
* bump MI

Modified: RT-Extension-AttributeWalker/META.yml
==============================================================================
--- RT-Extension-AttributeWalker/META.yml	(original)
+++ RT-Extension-AttributeWalker/META.yml	Fri Jan 18 12:51:58 2008
@@ -1,8 +1,9 @@
 --- 
 abstract: Examining Attributes of a user
-author: Kevin Falcone  C<< <falcone at bestpractical.com> >>
+author: 
+  - Kevin Falcone  C<< <falcone at bestpractical.com> >>
 distribution_type: module
-generated_by: Module::Install version 0.67
+generated_by: Module::Install version 0.680
 license: perl
 meta-spec: 
   url: http://module-build.sourceforge.net/META-spec-v1.3.html

Modified: RT-Extension-AttributeWalker/inc/Module/Install.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install.pm	Fri Jan 18 12:51:58 2008
@@ -28,7 +28,7 @@
     # This is not enforced yet, but will be some time in the next few
     # releases once we can make sure it won't clash with custom
     # Module::Install extensions.
-    $VERSION = '0.67';
+    $VERSION = '0.68';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Base.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Base.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Base.pm	Fri Jan 18 12:51:58 2008
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.67';
+$VERSION = '0.68';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Can.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Can.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Can.pm	Fri Jan 18 12:51:58 2008
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Fetch.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Fetch.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Fetch.pm	Fri Jan 18 12:51:58 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Makefile.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Makefile.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Makefile.pm	Fri Jan 18 12:51:58 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Metadata.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Metadata.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Metadata.pm	Fri Jan 18 12:51:58 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: RT-Extension-AttributeWalker/inc/Module/Install/RTx.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/RTx.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/RTx.pm	Fri Jan 18 12:51:58 2008
@@ -1,16 +1,19 @@
 #line 1
 package Module::Install::RTx;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
+use Module::Install::Base;
+ at ISA = qw(Module::Install::Base);
 
-$Module::Install::RTx::VERSION = '0.11';
+$Module::Install::RTx::VERSION = '0.20';
 
 use strict;
 use FindBin;
-use File::Glob ();
+use File::Glob     ();
 use File::Basename ();
 
 sub RTx {
-    my ($self, $name) = @_;
+    my ( $self, $name ) = @_;
+
+    my $original_name = $name;
     my $RTx = 'RTx';
     $RTx = $1 if $name =~ s/^(\w+)-//;
     my $fname = $name;
@@ -20,41 +23,44 @@
         unless $self->name;
     $self->abstract("RT $name Extension")
         unless $self->abstract;
-    $self->version_from (-e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm")
+    $self->version_from( -e "$name.pm" ? "$name.pm" : "lib/$RTx/$fname.pm" )
         unless $self->version;
 
     my @prefixes = (qw(/opt /usr/local /home /usr /sw ));
-    my $prefix = $ENV{PREFIX};
-    @ARGV = grep { /PREFIX=(.*)/ ? (($prefix = $1), 0) : 1 } @ARGV;
+    my $prefix   = $ENV{PREFIX};
+    @ARGV = grep { /PREFIX=(.*)/ ? ( ( $prefix = $1 ), 0 ) : 1 } @ARGV;
 
     if ($prefix) {
         $RT::LocalPath = $prefix;
         $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
-    }
-    else {
+    } else {
         local @INC = (
             @INC,
-            $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : (),
-            map {( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" )} grep $_, @prefixes
+            $ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
+            map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
+            @prefixes
         );
         until ( eval { require RT; $RT::LocalPath } ) {
-            warn "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @INC\n";
+            warn
+                "Cannot find the location of RT.pm that defines \$RT::LocalPath in: @INC\n";
             $_ = $self->prompt("Path to your RT.pm:") or exit;
-            push @INC, $_, "$_/rt3/lib", "$_/lib/rt3";
+            push @INC, $_, "$_/rt3/lib", "$_/lib/rt3", "$_/lib";
         }
     }
 
-    my $lib_path = File::Basename::dirname($INC{'RT.pm'});
-    print "Using RT configurations from $INC{'RT.pm'}:\n";
-
-    $RT::LocalVarPath	||= $RT::VarPath;
-    $RT::LocalPoPath	||= $RT::LocalLexiconPath;
-    $RT::LocalHtmlPath	||= $RT::MasonComponentRoot;
+    my $lib_path = File::Basename::dirname( $INC{'RT.pm'} );
+    print "Using RT configuration from $INC{'RT.pm'}:\n";
+    unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
+
+    $RT::LocalVarPath  ||= $RT::VarPath;
+    $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
+    $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
 
     my %path;
     my $with_subdirs = $ENV{WITH_SUBDIRS};
-    @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? (($with_subdirs = $1), 0) : 1 } @ARGV;
-    my %subdirs = map { $_ => 1 } split(/\s*,\s*/, $with_subdirs);
+    @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
+        @ARGV;
+    my %subdirs = map { $_ => 1 } split( /\s*,\s*/, $with_subdirs );
 
     foreach (qw(bin etc html po sbin var)) {
         next unless -d "$FindBin::Bin/$_";
@@ -67,12 +73,25 @@
     }
 
     $path{$_} .= "/$name" for grep $path{$_}, qw(etc po var);
-    my $args = join(', ', map "q($_)", %path);
     $path{lib} = "$RT::LocalPath/lib" unless %subdirs and !$subdirs{'lib'};
+
+    # If we're running on RT 3.8 with plugin support, we really wany
+    # to install libs, mason templates and po files into plugin specific
+    # directories
+    if ($RT::LocalPluginPath) {
+        foreach my $path (qw(lib po html etc bin sbin)) {
+            next unless -d "$FindBin::Bin/$path";
+            next if %subdirs and !$subdirs{$path};
+            $path{$path} = $RT::LocalPluginPath . "/$original_name/$path";
+        }
+    }
+
+    my $args = join( ', ', map "q($_)", %path );
     print "./$_\t=> $path{$_}\n" for sort keys %path;
 
-    if (my @dirs = map { (-D => $_) } grep $path{$_}, qw(bin html sbin)) {
-        my @po = map { (-o => $_) } grep -f, File::Glob::bsd_glob("po/*.po");
+    if ( my @dirs = map { ( -D => $_ ) } grep $path{$_}, qw(bin html sbin) ) {
+        my @po = map { ( -o => $_ ) } grep -f,
+            File::Glob::bsd_glob("po/*.po");
         $self->postamble(<< ".") if @po;
 lexicons ::
 \t\$(NOECHO) \$(PERL) -MLocale::Maketext::Extract::Run=xgettext -e \"xgettext(qw(@dirs @po))\"
@@ -84,15 +103,16 @@
 \t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
 .
 
-    if ($path{var} and -d $RT::MasonDataDir) {
-        my ($uid, $gid) = (stat($RT::MasonDataDir))[4, 5];
+    if ( $path{var} and -d $RT::MasonDataDir ) {
+        my ( $uid, $gid ) = ( stat($RT::MasonDataDir) )[ 4, 5 ];
         $postamble .= << ".";
 \t\$(NOECHO) chown -R $uid:$gid $path{var}
 .
     }
 
     my %has_etc;
-    if (File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*")) {
+    if ( File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*") ) {
+
         # got schema, load factory module
         $has_etc{schema}++;
         $self->load('RTxFactory');
@@ -105,23 +125,22 @@
 
 .
     }
-    if (File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*")) {
+    if ( File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*") ) {
         $has_etc{acl}++;
     }
-    if (-e 'etc/initialdata') {
-        $has_etc{initialdata}++;
-    }
+    if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
 
     $self->postamble("$postamble\n");
-    if (%subdirs and !$subdirs{'lib'}) {
-        $self->makemaker_args(
-            PM => { "" => "" },
-        )
-    }
-    else {
+    if ( %subdirs and !$subdirs{'lib'} ) {
+        $self->makemaker_args( PM => { "" => "" }, );
+    } else {
         $self->makemaker_args( INSTALLSITELIB => "$RT::LocalPath/lib" );
     }
 
+        $self->makemaker_args( INSTALLSITEMAN1DIR => "$RT::LocalPath/man/man1" );
+        $self->makemaker_args( INSTALLSITEMAN3DIR => "$RT::LocalPath/man/man3" );
+        $self->makemaker_args( INSTALLSITEARCH => "$RT::LocalPath/man" );
+        $self->makemaker_args( INSTALLARCHLIB => "$RT::LocalPath/lib" );
     if (%has_etc) {
         $self->load('RTxInitDB');
         print "For first-time installation, type 'make initdb'.\n";
@@ -141,7 +160,7 @@
 }
 
 sub RTxInit {
-    unshift @INC, substr(delete($INC{'RT.pm'}), 0, -5) if $INC{'RT.pm'};
+    unshift @INC, substr( delete( $INC{'RT.pm'} ), 0, -5 ) if $INC{'RT.pm'};
     require RT;
     RT::LoadConfig();
     RT::ConnectToDatabase();
@@ -153,6 +172,6 @@
 
 __END__
 
-#line 220
+#line 239
 
-#line 241
+#line 260

Modified: RT-Extension-AttributeWalker/inc/Module/Install/Win32.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/Win32.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/Win32.pm	Fri Jan 18 12:51:58 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: RT-Extension-AttributeWalker/inc/Module/Install/WriteAll.pm
==============================================================================
--- RT-Extension-AttributeWalker/inc/Module/Install/WriteAll.pm	(original)
+++ RT-Extension-AttributeWalker/inc/Module/Install/WriteAll.pm	Fri Jan 18 12:51:58 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }



More information about the Bps-public-commit mailing list