[Rt-commit] r4771 - in RT-Extension-BrandedQueues: . inc/Module

jesse at bestpractical.com jesse at bestpractical.com
Fri Mar 17 15:29:48 EST 2006


Author: jesse
Date: Fri Mar 17 15:29:45 2006
New Revision: 4771

Added:
   RT-Extension-BrandedQueues/Changes
   RT-Extension-BrandedQueues/SIGNATURE
Modified:
   RT-Extension-BrandedQueues/   (props changed)
   RT-Extension-BrandedQueues/MANIFEST
   RT-Extension-BrandedQueues/META.yml
   RT-Extension-BrandedQueues/inc/Module/Install.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Base.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Can.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Fetch.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Makefile.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Metadata.pm
   RT-Extension-BrandedQueues/inc/Module/Install/Win32.pm
   RT-Extension-BrandedQueues/inc/Module/Install/WriteAll.pm

Log:
 r26349 at truegrounds:  jesse | 2006-03-17 15:28:32 -0500
 * releng


Added: RT-Extension-BrandedQueues/Changes
==============================================================================
--- (empty file)
+++ RT-Extension-BrandedQueues/Changes	Fri Mar 17 15:29:45 2006
@@ -0,0 +1,4 @@
+0.1 Fri Mar 17 15:27:02 EST 2006
+
+* Initial release
+

Modified: RT-Extension-BrandedQueues/MANIFEST
==============================================================================
--- RT-Extension-BrandedQueues/MANIFEST	(original)
+++ RT-Extension-BrandedQueues/MANIFEST	Fri Mar 17 15:29:45 2006
@@ -14,3 +14,5 @@
 MANIFEST			This list of files
 META.yml
 README
+SIGNATURE
+Changes

Modified: RT-Extension-BrandedQueues/META.yml
==============================================================================
--- RT-Extension-BrandedQueues/META.yml	(original)
+++ RT-Extension-BrandedQueues/META.yml	Fri Mar 17 15:29:45 2006
@@ -1,11 +1,11 @@
 abstract: RT Extension-BrandedQueues Extension
 distribution_type: module
-generated_by: Module::Install version 0.52
-license: unknown
+generated_by: Module::Install version 0.59
+license: Perl
 name: RT-Extension-BrandedQueues
 no_index:
   directory:
     - html
     - inc
     - t
-version: undef
+version: 0.1

Added: RT-Extension-BrandedQueues/SIGNATURE
==============================================================================
--- (empty file)
+++ RT-Extension-BrandedQueues/SIGNATURE	Fri Mar 17 15:29:45 2006
@@ -0,0 +1,40 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.50.
+
+To verify the content in this distribution, first make sure you have
+Module::Signature installed, then type:
+
+    % cpansign -v
+
+It will check each file's integrity, as well as the signature's
+validity.  If "==> Signature verified OK! <==" is not displayed,
+the distribution may already have been compromised, and you should
+not run its Makefile.PL or Build.PL.
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+SHA1 d7b7915a135f324847f2aa073bfa752af3b60821 Changes
+SHA1 db70a49eccdfdd40e3af54473a805dfdc558d2b5 MANIFEST
+SHA1 602ffe01687fe648ac57b6445c453ccdb7aa0f0a META.yml
+SHA1 634e73e73a75095e00e203ee4b8ec3abffbeba71 Makefile.PL
+SHA1 10851c1a297482004835cab4e206ab0f571bd6f1 README
+SHA1 3bb0f139dcaea2d71caf760213d0b3669f5a8940 html/Callbacks/RT-Extension-BrandedQueues/Admin/Queues/Modify.html/Default
+SHA1 5d6aec488a25e4d052c0f462092116cb310dc45c html/Callbacks/RT-Extension-BrandedQueues/Admin/Queues/Modify.html/ProcessLinks
+SHA1 8c148eea911b533d14939ff0768fdfb6f4f01064 inc/Module/Install.pm
+SHA1 4da9ebfcc908e10f83550de6af88209b86fccb78 inc/Module/Install/Base.pm
+SHA1 0e815817b540239832c9676bdecbc2b8fece4648 inc/Module/Install/Can.pm
+SHA1 df484a10652c283b4e7a65269306d659dc720d91 inc/Module/Install/Fetch.pm
+SHA1 3952168dc081e51c6a86a0edc05d21f5e1bb9ef5 inc/Module/Install/Makefile.pm
+SHA1 f3a3e6011710d891560d46cfeb853e8f80b5d63c inc/Module/Install/Metadata.pm
+SHA1 f502de0d0610ec3a8a2dd0e32c9e12e2971a96aa inc/Module/Install/RTx.pm
+SHA1 c2e697236ed6c1a1abce9b1188235a5582d60a3d inc/Module/Install/Win32.pm
+SHA1 b02e69b07eeaea33b67e0a7c3c8faa45e60e7dd4 inc/Module/Install/WriteAll.pm
+SHA1 ffa5582d2e88f2aabfcc6dd8a17977f8ff23638a lib/RT/Extension/BrandedQueues.pm
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.1 (GNU/Linux)
+
+iD8DBQFEGxvZEi9d9xCOQEYRAvAXAJ9aKdLSULqfVrB5+kKJDkRu/RikNwCgsME7
+z/z49MEUITgHOLS90HVnA70=
+=ntv5
+-----END PGP SIGNATURE-----

Modified: RT-Extension-BrandedQueues/inc/Module/Install.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install.pm	Fri Mar 17 15:29:45 2006
@@ -3,14 +3,21 @@
 
 use 5.004;
 use strict 'vars';
+
 use vars qw{$VERSION};
 BEGIN {
-    # Don't forget to update Module::Install::Admin too!
-    $VERSION = '0.52';
+    # All Module::Install core packages now require synchronised versions.
+    # This will be used to ensure we don't accidentally load old or
+    # different versions of modules.
+    # 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.59';
 }
 
 # inc::Module::Install must be loaded first
-unless ( $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'} ) {
+my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
+unless ( $INC{$file} ) {
     die <<"END_DIE";
 Please invoke ${\__PACKAGE__} with:
 
@@ -24,26 +31,25 @@
 }
 
 use Cwd        ();
-use FindBin;
 use File::Find ();
 use File::Path ();
+use FindBin;
 
 *inc::Module::Install::VERSION = *VERSION;
- at inc::Module::Install::ISA     = 'Module::Install';
+ at inc::Module::Install::ISA     = __PACKAGE__;
 
 sub autoload {
-    my $self   = shift;
-    my $caller = $self->_caller;
-    my $cwd    = Cwd::cwd();
-    my $sym    = "$caller\::AUTOLOAD";
-
+    my $self = shift;
+    my $who  = $self->_caller;
+    my $cwd  = Cwd::cwd();
+    my $sym  = "${who}::AUTOLOAD";
     $sym->{$cwd} = sub {
         my $pwd = Cwd::cwd();
         if ( my $code = $sym->{$pwd} ) {
             # delegate back to parent dirs
             goto &$code unless $cwd eq $pwd;
         }
-        $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller - $sym";
+        $$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
         unshift @_, ($self, $1);
         goto &{$self->can('call')} unless uc($1) eq $1;
     };
@@ -52,18 +58,18 @@
 sub import {
     my $class = shift;
     my $self  = $class->new(@_);
+    my $who   = $self->_caller;
 
     unless ( -f $self->{file} ) {
         require "$self->{path}/$self->{dispatch}.pm";
         File::Path::mkpath("$self->{prefix}/$self->{author}");
-        $self->{admin} = 
-          "$self->{name}::$self->{dispatch}"->new(_top => $self);
+        $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
         $self->{admin}->init;
         @_ = ($class, _self => $self);
         goto &{"$self->{name}::import"};
     }
 
-    *{$self->_caller . "::AUTOLOAD"} = $self->autoload;
+    *{"${who}::AUTOLOAD"} = $self->autoload;
     $self->preload;
 
     # Unregister loader and worker packages so subdirs can use them again
@@ -74,11 +80,11 @@
 sub preload {
     my ($self) = @_;
 
-        unless ( $self->{extentions} ) {
-                $self->load_extensions(
-                        "$self->{prefix}/$self->{path}", $self
-                        );
-        }
+    unless ( $self->{extensions} ) {
+        $self->load_extensions(
+            "$self->{prefix}/$self->{path}", $self
+        );
+    }
 
     my @exts = @{$self->{extensions}};
     unless ( @exts ) {
@@ -86,21 +92,21 @@
         @exts = $admin->load_all_extensions;
     }
 
-    my %seen_method;
+    my %seen;
     foreach my $obj ( @exts ) {
         while (my ($method, $glob) = each %{ref($obj) . '::'}) {
-            next unless defined *{$glob}{CODE};
+            next unless exists &{ref($obj).'::'.$method};
             next if $method =~ /^_/;
             next if $method eq uc($method);
-            $seen_method{$method}++;
+            $seen{$method}++;
         }
     }
 
-    my $caller = $self->_caller;
-    foreach my $name (sort keys %seen_method) {
-        *{"${caller}::$name"} = sub {
-            ${"${caller}::AUTOLOAD"} = "${caller}::$name";
-            goto &{"${caller}::AUTOLOAD"};
+    my $who = $self->_caller;
+    foreach my $name ( sort keys %seen ) {
+        *{"${who}::$name"} = sub {
+            ${"${who}::AUTOLOAD"} = "${who}::$name";
+            goto &{"${who}::AUTOLOAD"};
         };
     }
 }
@@ -118,30 +124,26 @@
 
     $args{dispatch} ||= 'Admin';
     $args{prefix}   ||= 'inc';
-    $args{author}   ||= '.author';
+    $args{author}   ||= ($^O eq 'VMS' ? '_author' : '.author');
     $args{bundle}   ||= 'inc/BUNDLES';
     $args{base}     ||= $base_path;
-
     $class =~ s/^\Q$args{prefix}\E:://;
     $args{name}     ||= $class;
     $args{version}  ||= $class->VERSION;
-
-    unless ($args{path}) {
+    unless ( $args{path} ) {
         $args{path}  = $args{name};
         $args{path}  =~ s!::!/!g;
     }
     $args{file}     ||= "$args{base}/$args{prefix}/$args{path}.pm";
 
-    bless(\%args, $class);
+    bless \%args, $class;
 }
 
 sub call {
-    my $self   = shift;
-    my $method = shift;
-    my $obj    = $self->load($method) or return;
-
-    unshift @_, $obj;
-    goto &{$obj->can($method)};
+	my ($self, $method) = @_;
+	my $obj = $self->load($method) or return;
+        splice(@_, 0, 2, $obj);
+	goto &{$obj->can($method)};
 }
 
 sub load {
@@ -167,13 +169,14 @@
 }
 
 sub load_extensions {
-    my ($self, $path, $top_obj) = @_;
+    my ($self, $path, $top) = @_;
 
-    unshift @INC, $self->{prefix}
-        unless grep { $_ eq $self->{prefix} } @INC;
+    unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+        unshift @INC, $self->{prefix};
+    }
 
     local @INC = ($path, @INC);
-    foreach my $rv ($self->find_extensions($path)) {
+    foreach my $rv ( $self->find_extensions($path) ) {
         my ($file, $pkg) = @{$rv};
         next if $self->{pathnames}{$pkg};
 
@@ -184,7 +187,7 @@
             next;
         }
         $self->{pathnames}{$pkg} = delete $INC{$file};
-        push @{$self->{extensions}}, &{$new}($pkg, _top => $top_obj );
+        push @{$self->{extensions}}, &{$new}($pkg, _top => $top );
     }
 
     $self->{extensions} ||= [];
@@ -197,10 +200,32 @@
     File::Find::find( sub {
         my $file = $File::Find::name;
         return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
-        return if $1 eq $self->{dispatch};
+        my $subpath = $1;
+        return if lc($subpath) eq lc($self->{dispatch});
+
+        $file = "$self->{path}/$subpath.pm";
+        my $pkg = "$self->{name}::$subpath";
+        $pkg =~ s!/!::!g;
+
+        # If we have a mixed-case package name, assume case has been preserved
+        # correctly.  Otherwise, root through the file to locate the case-preserved
+        # version of the package name.
+        if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
+            open PKGFILE, "<$subpath.pm" or die "find_extensions: Can't open $subpath.pm: $!";
+            my $in_pod = 0;
+            while ( <PKGFILE> ) {
+                $in_pod = 1 if /^=\w/;
+                $in_pod = 0 if /^=cut/;
+                next if ($in_pod || /^=cut/);  # skip pod text
+                next if /^\s*#/;               # and comments
+                if ( m/^\s*package\s+($pkg)\s*;/i ) {
+                    $pkg = $1;
+                    last;
+                }
+            }
+            close PKGFILE;
+        }
 
-        $file = "$self->{path}/$1.pm";
-        my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
         push @found, [ $file, $pkg ];
     }, $path ) if -d $path;
 
@@ -208,15 +233,13 @@
 }
 
 sub _caller {
-    my $depth  = 0;
-    my $caller = caller($depth);
-
-    while ($caller eq __PACKAGE__) {
+    my $depth = 0;
+    my $call  = caller($depth);
+    while ( $call eq __PACKAGE__ ) {
         $depth++;
-        $caller = caller($depth);
+        $call = caller($depth);
     }
-
-    $caller;
+    return $call;
 }
 
 1;

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Base.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Base.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Base.pm	Fri Mar 17 15:29:45 2006
@@ -1,47 +1,52 @@
 #line 1 "inc/Module/Install/Base.pm - /usr/local/share/perl/5.8.7/Module/Install/Base.pm"
 package Module::Install::Base;
 
+$VERSION = '0.59';
+
 # Suspend handler for "redefined" warnings
-BEGIN { my $w = $SIG{__WARN__}; $SIG{__WARN__} = sub { $w } };
+BEGIN {
+	my $w = $SIG{__WARN__};
+	$SIG{__WARN__} = sub { $w };
+}
+
+### This is the ONLY module that shouldn't have strict on
+# use strict;
 
-#line 30
+#line 41
 
 sub new {
     my ($class, %args) = @_;
 
-    foreach my $method (qw(call load)) {
+    foreach my $method ( qw(call load) ) {
         *{"$class\::$method"} = sub {
-            +shift->_top->$method(@_);
+            shift()->_top->$method(@_);
         } unless defined &{"$class\::$method"};
     }
 
-    bless(\%args, $class);
+    bless( \%args, $class );
 }
 
-#line 48
+#line 61
 
 sub AUTOLOAD {
     my $self = shift;
-
     local $@;
     my $autoload = eval { $self->_top->autoload } or return;
     goto &$autoload;
 }
 
-#line 62
+#line 76
 
 sub _top { $_[0]->{_top} }
 
-#line 73
+#line 89
 
 sub admin {
-    my $self = shift;
-    $self->_top->{admin} or Module::Install::Base::FakeAdmin->new;
+    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
 }
 
 sub is_admin {
-    my $self = shift;
-    $self->admin->VERSION;
+    $_[0]->admin->VERSION;
 }
 
 sub DESTROY {}
@@ -50,14 +55,16 @@
 
 my $Fake;
 sub new { $Fake ||= bless(\@_, $_[0]) }
+
 sub AUTOLOAD {}
-sub DESTROY {}
 
-1;
+sub DESTROY {}
 
 # Restore warning handler
-BEGIN { $SIG{__WARN__} = $SIG{__WARN__}->() };
+BEGIN {
+	$SIG{__WARN__} = $SIG{__WARN__}->();
+}
 
-__END__
+1;
 
-#line 120
+#line 138

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Can.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Can.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Can.pm	Fri Mar 17 15:29:45 2006
@@ -1,13 +1,19 @@
 #line 1 "inc/Module/Install/Can.pm - /usr/local/share/perl/5.8.7/Module/Install/Can.pm"
 package Module::Install::Can;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
-$VERSION = '0.01';
+
+use Module::Install::Base;
+ at ISA = qw(Module::Install::Base);
+
+$VERSION = '0.59';
 
 use strict;
 use Config ();
-use File::Spec ();
 use ExtUtils::MakeMaker ();
 
+# This may introduce a 5.005 dependency, or at the very least it may
+# not bootstrap properly under 5.004.
+use File::Spec ();
+ 
 # check if we can load some module
 sub can_use {
     my ($self, $mod, $ver) = @_;
@@ -53,14 +59,14 @@
 if ($^O eq 'cygwin') {
     require ExtUtils::MM_Cygwin;
     require ExtUtils::MM_Win32;
-    if (!defined(&ExtUtils::MM_Cygwin::maybe_command)) {
+    if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
         *ExtUtils::MM_Cygwin::maybe_command = sub {
             my ($self, $file) = @_;
-            if ($file =~ m{^/cygdrive/}i) {
+            if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
                 ExtUtils::MM_Win32->maybe_command($file);
             }
             else {
-                $self->SUPER::maybe_command($file);
+                ExtUtils::MM_Unix->maybe_command($file);
             }
         }
     }

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Fetch.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Fetch.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Fetch.pm	Fri Mar 17 15:29:45 2006
@@ -1,15 +1,21 @@
 #line 1 "inc/Module/Install/Fetch.pm - /usr/local/share/perl/5.8.7/Module/Install/Fetch.pm"
 package Module::Install::Fetch;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
-$VERSION = '0.01';
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION @ISA};
+BEGIN {
+	$VERSION = '0.59';
+	@ISA     = qw{Module::Install::Base};
+}
 
 sub get_file {
     my ($self, %args) = @_;
     my ($scheme, $host, $path, $file) = 
         $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
 
-    if ($scheme eq 'http' and !eval { require LWP::Simple; 1 }) {
+    if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
         $args{url} = $args{ftp_url}
             or (warn("LWP support unavailable!\n"), return);
         ($scheme, $host, $path, $file) = 
@@ -53,14 +59,14 @@
             chdir $dir; return;
         }
 
-        my @dialog = split(/\n/, << ".");
+        my @dialog = split(/\n/, <<"END_FTP");
 open $host
 user anonymous anonymous\@example.com
 cd $path
 binary
 get $file $file
 quit
-.
+END_FTP
         foreach (@dialog) { $fh->print("$_\n") }
         $fh->close;
     } }

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Makefile.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Makefile.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Makefile.pm	Fri Mar 17 15:29:45 2006
@@ -1,19 +1,36 @@
 #line 1 "inc/Module/Install/Makefile.pm - /usr/local/share/perl/5.8.7/Module/Install/Makefile.pm"
 package Module::Install::Makefile;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
-
-$VERSION = '0.01';
 
 use strict 'vars';
-use vars '$VERSION';
-
+use Module::Install::Base;
 use ExtUtils::MakeMaker ();
 
+use vars qw{$VERSION @ISA};
+BEGIN {
+	$VERSION = '0.59';
+	@ISA     = qw{Module::Install::Base};
+}
+
 sub Makefile { $_[0] }
 
-sub prompt { 
+my %seen = ();
+
+sub prompt {
     shift;
-    goto &ExtUtils::MakeMaker::prompt;
+
+    # Infinite loop protection
+    my @c = caller();
+    if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+        die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+    }
+
+    # In automated testing, always use defaults
+    if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+        local $ENV{PERL_MM_USE_DEFAULT} = 1;
+        goto &ExtUtils::MakeMaker::prompt;
+    } else {
+        goto &ExtUtils::MakeMaker::prompt;
+    }
 }
 
 sub makemaker_args {
@@ -23,8 +40,19 @@
     $args;
 }
 
-sub build_subdirs {
+# For mm args that take multiple space-seperated args,
+# append an argument to the current list.
+sub makemaker_append {
     my $self = shift;
+    my $name = shift;
+    my $args = $self->makemaker_args;
+    $args->{name} = defined $args->{$name}
+    	? join( ' ', $args->{name}, @_ )
+    	: join( ' ', @_ );
+}
+
+sub build_subdirs {
+    my $self    = shift;
     my $subdirs = $self->makemaker_args->{DIR} ||= [];
     for my $subdir (@_) {
         push @$subdirs, $subdir;
@@ -32,17 +60,17 @@
 }
 
 sub clean_files {
-    my $self = shift;
+    my $self  = shift;
     my $clean = $self->makemaker_args->{clean} ||= {};
     %$clean = (
         %$clean, 
-        FILES => join(" ", grep length, $clean->{FILES}, @_),
+        FILES => join(' ', grep length, $clean->{FILES}, @_),
     );
 }
 
 sub libs {
     my $self = shift;
-    my $libs = ref $_[0] ? shift : [shift];
+    my $libs = ref $_[0] ? shift : [ shift ];
     $self->makemaker_args( LIBS => $libs );
 }
 
@@ -56,25 +84,26 @@
     die "&Makefile->write() takes no arguments\n" if @_;
 
     my $args = $self->makemaker_args;
-
     $args->{DISTNAME} = $self->name;
-    $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
-    $args->{VERSION} = $self->version || $self->determine_VERSION($args);
-    $args->{NAME} =~ s/-/::/g;
-
-    $args->{test} = {TESTS => $self->tests} if $self->tests;
-
+    $args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
+    $args->{VERSION}  = $self->version || $self->determine_VERSION($args);
+    $args->{NAME}     =~ s/-/::/g;
+    if ( $self->tests ) {
+        $args->{test} = { TESTS => $self->tests };
+    }
     if ($] >= 5.005) {
         $args->{ABSTRACT} = $self->abstract;
-        $args->{AUTHOR} = $self->author;
+        $args->{AUTHOR}   = $self->author;
     }
     if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
         $args->{NO_META} = 1;
     }
-    if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 ) {
-        $args->{SIGN} = 1 if $self->sign;
+    if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+        $args->{SIGN} = 1;
+    }
+    unless ( $self->is_admin ) {
+        delete $args->{SIGN};
     }
-    delete $args->{SIGN} unless $self->is_admin;
 
     # merge both kinds of requires into prereq_pm
     my $prereq = ($args->{PREREQ_PM} ||= {});
@@ -91,49 +120,50 @@
         }
     }
 
-    if (my $perl_version = $self->perl_version) {
+    if ( my $perl_version = $self->perl_version ) {
         eval "use $perl_version; 1"
-            or die "ERROR: perl: Version $] is installed, ".
-                   "but we need version >= $perl_version";
+            or die "ERROR: perl: Version $] is installed, "
+                . "but we need version >= $perl_version";
     }
 
-    my %args = map {($_ => $args->{$_})} grep {defined($args->{$_})} keys %$args;
-
+    my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
     if ($self->admin->preop) {
         $args{dist} = $self->admin->preop;
     }
 
-    ExtUtils::MakeMaker::WriteMakefile(%args);
-
-    $self->fix_up_makefile();
+    my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+    $self->fix_up_makefile($mm->{FIRST_MAKEFILE});
 }
 
 sub fix_up_makefile {
-    my $self = shift;
-    my $top_class = ref($self->_top) || '';
-    my $top_version = $self->_top->VERSION || '';
+    my $self          = shift;
+    my $makefile_name = shift;
+    my $top_class     = ref($self->_top) || '';
+    my $top_version   = $self->_top->VERSION || '';
 
     my $preamble = $self->preamble 
-       ? "# Preamble by $top_class $top_version\n" . $self->preamble
-       : '';
-    my $postamble = "# Postamble by $top_class $top_version\n" . 
-                    ($self->postamble || '');
+        ? "# Preamble by $top_class $top_version\n"
+            . $self->preamble
+        : '';
+    my $postamble = "# Postamble by $top_class $top_version\n"
+        . ($self->postamble || '');
 
     local *MAKEFILE;
-    open MAKEFILE, '< Makefile' or die $!;
+    open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
     my $makefile = do { local $/; <MAKEFILE> };
-    close MAKEFILE;
+    close MAKEFILE or die $!;
 
     $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
     $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
     $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+    $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+    $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
 
-    $makefile =~ s/^(FULLPERL = .*)/$1 -Iinc/m;
-    $makefile =~ s/^(PERL = .*)/$1 -Iinc/m;
+    open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+    print MAKEFILE  "$preamble$makefile$postamble" or die $!;
+    close MAKEFILE  or die $!;
 
-    open MAKEFILE, '> Makefile' or die $!;
-    print MAKEFILE "$preamble$makefile$postamble";
-    close MAKEFILE;
+    1;
 }
 
 sub preamble {
@@ -144,7 +174,6 @@
 
 sub postamble {
     my ($self, $text) = @_;
-
     $self->{postamble} ||= $self->admin->postamble;
     $self->{postamble} .= $text if defined $text;
     $self->{postamble}
@@ -154,4 +183,4 @@
 
 __END__
 
-#line 286
+#line 312

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Metadata.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Metadata.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Metadata.pm	Fri Mar 17 15:29:45 2006
@@ -1,14 +1,12 @@
 #line 1 "inc/Module/Install/Metadata.pm - /usr/local/share/perl/5.8.7/Module/Install/Metadata.pm"
 package Module::Install::Metadata;
 
-use strict 'vars';
 use Module::Install::Base;
+ at ISA = qw{Module::Install::Base};
 
-use vars qw($VERSION @ISA);
-BEGIN {
-    $VERSION = '0.06';
-    @ISA     = 'Module::Install::Base';
-}
+$VERSION = '0.59';
+
+use strict 'vars';
 
 my @scalar_keys = qw{
     name module_name abstract author version license
@@ -62,6 +60,16 @@
     return $self;
 }
 
+sub dynamic_config {
+	my $self = shift;
+	unless ( @_ ) {
+		warn "You MUST provide an explicit true/false value to dynamic_config, skipping\n";
+		return $self;
+	}
+	$self->{'values'}{'dynamic_config'} = $_[0] ? 1 : 0;
+	return $self;
+}
+
 sub all_from {
     my ( $self, $file ) = @_;
 
@@ -130,8 +138,7 @@
         # The user used ->feature like ->features by passing in the second
         # argument as a reference.  Accomodate for that.
         $mods = $_[0];
-    }
-    else {
+    } else {
         $mods = \@_;
     }
 
@@ -154,7 +161,9 @@
     while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
         $self->feature( $name, @$mods );
     }
-    return @{ $self->{values}{features} };
+    return $self->{values}->{features}
+    	? @{ $self->{values}->{features} }
+    	: ();
 }
 
 sub no_index {

Modified: RT-Extension-BrandedQueues/inc/Module/Install/Win32.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/Win32.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/Win32.pm	Fri Mar 17 15:29:45 2006
@@ -1,8 +1,10 @@
 #line 1 "inc/Module/Install/Win32.pm - /usr/local/share/perl/5.8.7/Module/Install/Win32.pm"
 package Module::Install::Win32;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
-$VERSION = '0.02';
+use Module::Install::Base;
+ at ISA = qw(Module::Install::Base);
+
+$VERSION = '0.59';
 
 use strict;
 

Modified: RT-Extension-BrandedQueues/inc/Module/Install/WriteAll.pm
==============================================================================
--- RT-Extension-BrandedQueues/inc/Module/Install/WriteAll.pm	(original)
+++ RT-Extension-BrandedQueues/inc/Module/Install/WriteAll.pm	Fri Mar 17 15:29:45 2006
@@ -1,6 +1,12 @@
 #line 1 "inc/Module/Install/WriteAll.pm - /usr/local/share/perl/5.8.7/Module/Install/WriteAll.pm"
 package Module::Install::WriteAll;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
+
+use Module::Install::Base;
+ at ISA = qw(Module::Install::Base);
+
+$VERSION = '0.59';
+
+use strict;
 
 sub WriteAll {
     my $self = shift;
@@ -12,22 +18,20 @@
         @_
     );
 
-    $self->sign(1) if $args{sign};
-    $self->Meta->write if $args{meta};
+    $self->sign(1)                if $args{sign};
+    $self->Meta->write            if $args{meta};
     $self->admin->WriteAll(%args) if $self->is_admin;
 
-    if ($0 =~ /Build.PL$/i) {
+    if ( $0 =~ /Build.PL$/i ) {
         $self->Build->write;
-    }
-    else {
+    } else {
         $self->check_nmake if $args{check_nmake};
-        $self->makemaker_args( PL_FILES => {} )
-            unless $self->makemaker_args->{'PL_FILES'};
-
+        unless ( $self->makemaker_args->{'PL_FILES'} ) {
+        	$self->makemaker_args( PL_FILES => {} );
+        }
         if ($args{inline}) {
             $self->Inline->write;
-        }
-        else {
+        } else {
             $self->Makefile->write;
         }
     }


More information about the Rt-commit mailing list