[Bps-public-commit] net-lighthouse branch, master, updated. 377d20d2b8e1cc4fffb627d563ca3781feceba76

? sunnavy sunnavy at bestpractical.com
Sat Mar 27 02:01:22 EDT 2010


The branch, master has been updated
       via  377d20d2b8e1cc4fffb627d563ca3781feceba76 (commit)
       via  147186196ea16306aeb353896882b79a0aa7c527 (commit)
       via  9f5f34fa0d4ea8ecdfd6d0e50fca9af272d92ba1 (commit)
       via  7b2cf51a510eddc72a652102967f71abc3455a9c (commit)
       via  8edda1b6f69d0449d1a1cf15d9202a2325992792 (commit)
       via  1478d0330c9648ff3e115bef488e8e8ec7773cc5 (commit)
       via  b450bdb129a14dda4dc0322441c1739e7f5744d4 (commit)
       via  8fe70a20b9d8f48f30d27ebd9e181cd7675fdd55 (commit)
      from  35c8080b0d3e6f0e252668627715d6de5d5f333f (commit)

Summary of changes:
 Changes                                         |    8 ++-
 MANIFEST                                        |   71 +++++++++++++++++++++++
 META.yml                                        |   35 +++++++++++
 README                                          |    5 +-
 inc/Module/AutoInstall.pm                       |   17 +++++-
 inc/Module/Install.pm                           |   37 ++++++++----
 inc/Module/Install/AutoInstall.pm               |    2 +-
 inc/Module/Install/Base.pm                      |    2 +-
 inc/Module/Install/Can.pm                       |    2 +-
 inc/Module/Install/Fetch.pm                     |    2 +-
 inc/Module/Install/Include.pm                   |    2 +-
 inc/Module/Install/Makefile.pm                  |   58 ++++++++++++++----
 inc/Module/Install/Metadata.pm                  |   57 +++++++++++++------
 inc/Module/Install/Win32.pm                     |    2 +-
 inc/Module/Install/WriteAll.pm                  |    2 +-
 lib/Net/Lighthouse.pm                           |    6 +-
 lib/Net/Lighthouse/Base.pm                      |    2 +-
 lib/Net/Lighthouse/Project.pm                   |    2 +-
 lib/Net/Lighthouse/Project/Changeset.pm         |    2 +-
 lib/Net/Lighthouse/Project/Message.pm           |    2 +-
 lib/Net/Lighthouse/Project/Milestone.pm         |    2 +-
 lib/Net/Lighthouse/Project/Ticket.pm            |    2 +-
 lib/Net/Lighthouse/Project/Ticket/Attachment.pm |   15 ++++-
 lib/Net/Lighthouse/Project/Ticket/Version.pm    |    2 +-
 lib/Net/Lighthouse/Project/TicketBin.pm         |    2 +-
 lib/Net/Lighthouse/Token.pm                     |    2 +-
 lib/Net/Lighthouse/User.pm                      |    2 +-
 lib/Net/Lighthouse/User/Membership.pm           |    2 +-
 lib/Net/Lighthouse/Util.pm                      |    2 +-
 29 files changed, 276 insertions(+), 71 deletions(-)
 create mode 100644 MANIFEST
 create mode 100644 META.yml

- Log -----------------------------------------------------------------
commit 8fe70a20b9d8f48f30d27ebd9e181cd7675fdd55
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 26 15:48:13 2010 +0800

    tweak for Moose

diff --git a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
index 71bbd3e..301598f 100644
--- a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
+++ b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
@@ -19,7 +19,12 @@ has [ 'content_type', 'filename', 'url', 'code' ] => (
     is  => 'ro',
 );
 
-# make test happy, added Test::MockObject
+# make tests happy, added Test::MockObject
+if ( $INC{'Moose.pm'} ) {
+    require Moose::Util::TypeConstraints;
+    Moose::Util::TypeConstraints::class_type( 'LWP::UserAgent' );
+    Moose::Util::TypeConstraints::class_type( 'Test::MockObject' );
+}
 has 'ua' => ( is => 'ro', isa => 'LWP::UserAgent|Test::MockObject', );
 
 has 'content' => (

commit b450bdb129a14dda4dc0322441c1739e7f5744d4
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 26 15:49:20 2010 +0800

    update changes

diff --git a/Changes b/Changes
index 7542b9d..462d832 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Net-Lighthouse
 
-0.05
+0.05 Fri Mar 26 07:48:36 GMT 2010
+    * fixed Moose related issue
 
 0.04 Sat Sep 12 00:10:18 CST 2009
     * use XML::TreePP to parse xml

commit 1478d0330c9648ff3e115bef488e8e8ec7773cc5
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 26 15:55:52 2010 +0800

    update package files

diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..f62bfb7
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,71 @@
+Changes
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/Net/Lighthouse.pm
+lib/Net/Lighthouse/Base.pm
+lib/Net/Lighthouse/Project.pm
+lib/Net/Lighthouse/Project/Changeset.pm
+lib/Net/Lighthouse/Project/Message.pm
+lib/Net/Lighthouse/Project/Milestone.pm
+lib/Net/Lighthouse/Project/Ticket.pm
+lib/Net/Lighthouse/Project/Ticket/Attachment.pm
+lib/Net/Lighthouse/Project/Ticket/Version.pm
+lib/Net/Lighthouse/Project/TicketBin.pm
+lib/Net/Lighthouse/Token.pm
+lib/Net/Lighthouse/User.pm
+lib/Net/Lighthouse/User/Membership.pm
+lib/Net/Lighthouse/Util.pm
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+README
+t/00.load.t
+t/01-base.t
+t/02-project.t
+t/03-ticket.t
+t/04-ticket-version.t
+t/05-ticket-attachment.t
+t/06-user.t
+t/07-user-membership.t
+t/08-token.t
+t/09-milestone.t
+t/10-changeset.t
+t/11-message.t
+t/12-ticket-bin.t
+t/20-lighthouse.t
+t/data/bin_48889.xml
+t/data/bins.xml
+t/data/changeset_983.xml
+t/data/changeset_new.xml
+t/data/changesets.xml
+t/data/find_project_35918.xml
+t/data/message_20298.xml
+t/data/message_new.xml
+t/data/messages.xml
+t/data/milestone_48761.xml
+t/data/milestone_new.xml
+t/data/milestones.xml
+t/data/project_new.xml
+t/data/projects.xml
+t/data/ticket_1.xml
+t/data/ticket_1_attachment_1.xml
+t/data/ticket_1_version_1.xml
+t/data/ticket_new.xml
+t/data/tickets.xml
+t/data/token.xml
+t/data/user_67166.xml
+t/data/user_67166_membership_69274.xml
+t/data/user_67166_memberships.xml
+xt/kwalitee.t
+xt/perlcritic.t
+xt/pod-coverage.t
+xt/pod.t
diff --git a/META.yml b/META.yml
new file mode 100644
index 0000000..8b63c30
--- /dev/null
+++ b/META.yml
@@ -0,0 +1,35 @@
+---
+abstract: 'Perl interface to lighthouseapp.com'
+author:
+  - 'sunnavy <sunnavy at bestpractical.com>'
+build_requires:
+  ExtUtils::MakeMaker: 6.42
+  Test::Mock::LWP: 0
+  Test::More: 0
+configure_requires:
+  ExtUtils::MakeMaker: 6.42
+distribution_type: module
+generated_by: 'Module::Install version 0.92'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Net-Lighthouse
+no_index:
+  directory:
+    - inc
+    - t
+    - xt
+requires:
+  Any::Moose: 0
+  DateTime: 0
+  LWP: 0
+  MIME::Base64: 0
+  Params::Validate: 0
+  URI::Escape: 0
+  XML::TreePP: 0
+  YAML::Syck: 0
+resources:
+  license: http://dev.perl.org/licenses/
+  repository: git://github.com/bestpractical/net-lighthouse.git
+version: 0.05
diff --git a/README b/README
index 22ce634..410f618 100644
--- a/README
+++ b/README
@@ -1,5 +1,4 @@
-Net-Lighthouse version
-
+Net-Lighthouse
 
 INSTALLATION
 
diff --git a/inc/Module/AutoInstall.pm b/inc/Module/AutoInstall.pm
index dfb8ef7..32c2cf3 100644
--- a/inc/Module/AutoInstall.pm
+++ b/inc/Module/AutoInstall.pm
@@ -672,7 +672,20 @@ sub _load {
 sub _load_cpan {
     return if $CPAN::VERSION and $CPAN::Config and not @_;
     require CPAN;
-    if ( $CPAN::HandleConfig::VERSION ) {
+
+    # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
+    #    CPAN::HandleConfig->load. CPAN reports that the redirection
+    #    is deprecated in a warning printed at the user.
+
+    # CPAN-1.81 expects CPAN::HandleConfig->load, does not have
+    #   $CPAN::HandleConfig::VERSION but cannot handle
+    #   CPAN::Config->load
+
+    # Which "versions expect CPAN::Config->load?
+
+    if ( $CPAN::HandleConfig::VERSION
+        || CPAN::HandleConfig->can('load')
+    ) {
         # Newer versions of CPAN have a HandleConfig module
         CPAN::HandleConfig->load;
     } else {
@@ -802,4 +815,4 @@ END_MAKE
 
 __END__
 
-#line 1056
+#line 1069
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 51eda5d..aceb4de 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -28,7 +28,7 @@ BEGIN {
 	# 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.91';
+	$VERSION = '0.92';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -348,17 +348,24 @@ sub _caller {
 	return $call;
 }
 
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
 	local *FH;
-	if ( $] >= 5.006 ) {
-		open( FH, '<', $_[0] ) or die "open($_[0]): $!";
-	} else {
-		open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
-	}
+	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
+	my $string = do { local $/; <FH> };
+	close FH or die "close($_[0]): $!";
+	return $string;
+}
+END_NEW
+sub _read {
+	local *FH;
+	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
 	return $string;
 }
+END_OLD
 
 sub _readperl {
 	my $string = Module::Install::_read($_[0]);
@@ -379,18 +386,26 @@ sub _readpod {
 	return $string;
 }
 
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
-	if ( $] >= 5.006 ) {
-		open( FH, '>', $_[0] ) or die "open($_[0]): $!";
-	} else {
-		open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
+	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+	foreach ( 1 .. $#_ ) {
+		print FH $_[$_] or die "print($_[0]): $!";
 	}
+	close FH or die "close($_[0]): $!";
+}
+END_NEW
+sub _write {
+	local *FH;
+	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
 	close FH or die "close($_[0]): $!";
 }
+END_OLD
 
 # _version is for processing module versions (eg, 1.03_05) not
 # Perl versions (eg, 5.8.1).
@@ -427,4 +442,4 @@ sub _CLASS ($) {
 
 1;
 
-# Copyright 2008 - 2009 Adam Kennedy.
+# Copyright 2008 - 2010 Adam Kennedy.
diff --git a/inc/Module/Install/AutoInstall.pm b/inc/Module/Install/AutoInstall.pm
index 58dd026..f04ca1e 100644
--- a/inc/Module/Install/AutoInstall.pm
+++ b/inc/Module/Install/AutoInstall.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 60a74d2..618bf57 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index e65e4f6..75b8a27 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -9,7 +9,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 05f2079..e3d6800 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index 7e792e0..69a0cf9 100644
--- a/inc/Module/Install/Include.pm
+++ b/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 98779db..acf10ef 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -7,7 +7,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -34,6 +34,17 @@ sub prompt {
 	}
 }
 
+# Store a cleaned up version of the MakeMaker version,
+# since we need to behave differently in a variety of
+# ways based on the MM version.
+my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
+
+# If we are passed a param, do a "newer than" comparison.
+# Otherwise, just return the MakeMaker version.
+sub makemaker {
+	( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
+}
+
 sub makemaker_args {
 	my $self = shift;
 	my $args = ( $self->{makemaker_args} ||= {} );
@@ -44,7 +55,7 @@ sub makemaker_args {
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-	my $self = sShift;
+	my $self = shift;
 	my $name = shift;
 	my $args = $self->makemaker_args;
 	$args->{name} = defined $args->{$name}
@@ -130,12 +141,13 @@ sub write {
 		# an underscore, even though its own version may contain one!
 		# Hence the funny regexp to get rid of it.  See RT #35800
 		# for details.
-		$self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
-		$self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+		my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
+		$self->build_requires(     'ExtUtils::MakeMaker' => $v );
+		$self->configure_requires( 'ExtUtils::MakeMaker' => $v );
 	} else {
 		# Allow legacy-compatibility with 5.005 by depending on the
 		# most recent EU:MM that supported 5.005.
-		$self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
+		$self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
 		$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
 	}
 
@@ -152,42 +164,62 @@ sub write {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
-	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+	if ( $self->makemaker(6.10) ) {
 		$args->{NO_META} = 1;
 	}
-	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+	if ( $self->makemaker(6.17) and $self->sign ) {
 		$args->{SIGN} = 1;
 	}
 	unless ( $self->is_admin ) {
 		delete $args->{SIGN};
 	}
 
-	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
-		map { @$_ }
+		map { @$_ } # flatten [module => version]
 		map { @$_ }
 		grep $_,
-		($self->configure_requires, $self->build_requires, $self->requires)
+		($self->requires)
 	);
 
 	# Remove any reference to perl, PREREQ_PM doesn't support it
 	delete $args->{PREREQ_PM}->{perl};
 
-	# merge both kinds of requires into prereq_pm
+	# Merge both kinds of requires into BUILD_REQUIRES
+	my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
+	%$build_prereq = ( %$build_prereq,
+		map { @$_ } # flatten [module => version]
+		map { @$_ }
+		grep $_,
+		($self->configure_requires, $self->build_requires)
+	);
+
+	# Remove any reference to perl, BUILD_REQUIRES doesn't support it
+	delete $args->{BUILD_REQUIRES}->{perl};
+
+	# Delete bundled dists from prereq_pm
 	my $subdirs = ($args->{DIR} ||= []);
 	if ($self->bundles) {
 		foreach my $bundle (@{ $self->bundles }) {
 			my ($file, $dir) = @$bundle;
 			push @$subdirs, $dir if -d $dir;
-			delete $prereq->{$file};
+			delete $build_prereq->{$file}; #Delete from build prereqs only
 		}
 	}
 
+	unless ( $self->makemaker('6.55_03') ) {
+		%$prereq = (%$prereq,%$build_prereq);
+		delete $args->{BUILD_REQUIRES};
+	}
+
 	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";
+
+		if ( $self->makemaker(6.48) ) {
+			$args->{MIN_PERL_VERSION} = $perl_version;
+		}
 	}
 
 	$args->{INSTALLDIRS} = $self->installdirs;
@@ -265,4 +297,4 @@ sub postamble {
 
 __END__
 
-#line 394
+#line 426
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 653193d..b00e6b1 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
@@ -230,6 +230,8 @@ sub all_from {
 		die("The path '$file' does not exist, or is not a file");
 	}
 
+    $self->{values}{all_from} = $file;
+
 	# Some methods pull from POD instead of code.
 	# If there is a matching .pod, use that instead
 	my $pod = $file;
@@ -385,11 +387,10 @@ sub name_from {
 	}
 }
 
-sub perl_version_from {
-	my $self = shift;
+sub _extract_perl_version {
 	if (
-		Module::Install::_read($_[0]) =~ m/
-		^
+		$_[0] =~ m/
+		^\s*
 		(?:use|require) \s*
 		v?
 		([\d_\.]+)
@@ -398,6 +399,16 @@ sub perl_version_from {
 	) {
 		my $perl_version = $1;
 		$perl_version =~ s{_}{}g;
+		return $perl_version;
+	} else {
+		return;
+	}
+}
+
+sub perl_version_from {
+	my $self = shift;
+	my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
+	if ($perl_version) {
 		$self->perl_version($perl_version);
 	} else {
 		warn "Cannot determine perl version info from $_[0]\n";
@@ -425,13 +436,12 @@ sub author_from {
 	}
 }
 
-sub license_from {
-	my $self = shift;
+sub _extract_license {
 	if (
-		Module::Install::_read($_[0]) =~ m/
+		$_[0] =~ m/
 		(
 			=head \d \s+
-			(?:licen[cs]e|licensing|copyright|legal)\b
+			(?:licen[cs]e|licensing|copyrights?|legal)\b
 			.*?
 		)
 		(=head\\d.*|=cut.*|)
@@ -439,7 +449,8 @@ sub license_from {
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+			'under the same (?:terms|license) as (?:perl|the perl programming language)' => 'perl', 1,
+			'under the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
 			'GNU general public license'         => 'gpl',         1,
 			'GNU public license'                 => 'gpl',         1,
 			'GNU lesser general public license'  => 'lgpl',        1,
@@ -456,20 +467,32 @@ sub license_from {
 			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
-			$pattern =~ s{\s+}{\\s+}g;
+			$pattern =~ s#\s+#\\s+#gs;
 			if ( $license_text =~ /\b$pattern\b/i ) {
-				$self->license($license);
-				return 1;
+			        return $license;
 			}
 		}
+	} else {
+	        return;
 	}
+}
 
-	warn "Cannot determine license info from $_[0]\n";
-	return 'unknown';
+sub license_from {
+	my $self = shift;
+	if (my $license=_extract_license(Module::Install::_read($_[0]))) {
+		$self->license($license);
+	} else {
+		warn "Cannot determine license info from $_[0]\n";
+		return 'unknown';
+	}
 }
 
 sub _extract_bugtracker {
-	my @links   = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g;
+	my @links   = $_[0] =~ m#L<(
+	 \Qhttp://rt.cpan.org/\E[^>]+|
+	 \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
+	 \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+	 )>#gx;
 	my %links;
 	@links{@links}=();
 	@links=keys %links;
@@ -485,7 +508,7 @@ sub bugtracker_from {
 		return 0;
 	}
 	if ( @links > 1 ) {
-		warn "Found more than on rt.cpan.org link in $_[0]\n";
+		warn "Found more than one bugtracker link in $_[0]\n";
 		return 0;
 	}
 
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index f2f99df..89f16f0 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';
+	$VERSION = '0.92';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 12471e5..af3ea05 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.91';;
+	$VERSION = '0.92';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

commit 8edda1b6f69d0449d1a1cf15d9202a2325992792
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 26 16:02:11 2010 +0800

    update copyright

diff --git a/README b/README
index 410f618..2274969 100644
--- a/README
+++ b/README
@@ -12,7 +12,7 @@ To install this module, run the following commands:
 
 COPYRIGHT AND LICENCE
 
-Copyright (C) 2009, sunnavy
+Copyright (C) 2009-2010 Best Practical Solutions
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse.pm b/lib/Net/Lighthouse.pm
index 1e1520b..12775f5 100644
--- a/lib/Net/Lighthouse.pm
+++ b/lib/Net/Lighthouse.pm
@@ -112,7 +112,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Base.pm b/lib/Net/Lighthouse/Base.pm
index 6286e6e..1827389 100644
--- a/lib/Net/Lighthouse/Base.pm
+++ b/lib/Net/Lighthouse/Base.pm
@@ -97,7 +97,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project.pm b/lib/Net/Lighthouse/Project.pm
index f60b15f..f34436c 100644
--- a/lib/Net/Lighthouse/Project.pm
+++ b/lib/Net/Lighthouse/Project.pm
@@ -410,7 +410,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Changeset.pm b/lib/Net/Lighthouse/Project/Changeset.pm
index 8dda419..cbf765a 100644
--- a/lib/Net/Lighthouse/Project/Changeset.pm
+++ b/lib/Net/Lighthouse/Project/Changeset.pm
@@ -248,7 +248,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Message.pm b/lib/Net/Lighthouse/Project/Message.pm
index 7e1b58c..a33edbc 100644
--- a/lib/Net/Lighthouse/Project/Message.pm
+++ b/lib/Net/Lighthouse/Project/Message.pm
@@ -356,7 +356,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Milestone.pm b/lib/Net/Lighthouse/Project/Milestone.pm
index 0b282d7..8f844da 100644
--- a/lib/Net/Lighthouse/Project/Milestone.pm
+++ b/lib/Net/Lighthouse/Project/Milestone.pm
@@ -288,7 +288,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Ticket.pm b/lib/Net/Lighthouse/Project/Ticket.pm
index bde2b48..6748621 100644
--- a/lib/Net/Lighthouse/Project/Ticket.pm
+++ b/lib/Net/Lighthouse/Project/Ticket.pm
@@ -406,7 +406,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
index 301598f..2530bc3 100644
--- a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
+++ b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
@@ -113,7 +113,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/Ticket/Version.pm b/lib/Net/Lighthouse/Project/Ticket/Version.pm
index 64c528d..d51b450 100644
--- a/lib/Net/Lighthouse/Project/Ticket/Version.pm
+++ b/lib/Net/Lighthouse/Project/Ticket/Version.pm
@@ -109,7 +109,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Project/TicketBin.pm b/lib/Net/Lighthouse/Project/TicketBin.pm
index 60c49d9..c542164 100644
--- a/lib/Net/Lighthouse/Project/TicketBin.pm
+++ b/lib/Net/Lighthouse/Project/TicketBin.pm
@@ -294,7 +294,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Token.pm b/lib/Net/Lighthouse/Token.pm
index 92e1413..8c1db55 100644
--- a/lib/Net/Lighthouse/Token.pm
+++ b/lib/Net/Lighthouse/Token.pm
@@ -137,7 +137,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/User.pm b/lib/Net/Lighthouse/User.pm
index a440632..1cf7640 100644
--- a/lib/Net/Lighthouse/User.pm
+++ b/lib/Net/Lighthouse/User.pm
@@ -174,7 +174,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/User/Membership.pm b/lib/Net/Lighthouse/User/Membership.pm
index 6651143..b04a80c 100644
--- a/lib/Net/Lighthouse/User/Membership.pm
+++ b/lib/Net/Lighthouse/User/Membership.pm
@@ -91,7 +91,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
diff --git a/lib/Net/Lighthouse/Util.pm b/lib/Net/Lighthouse/Util.pm
index ee8f382..df38662 100644
--- a/lib/Net/Lighthouse/Util.pm
+++ b/lib/Net/Lighthouse/Util.pm
@@ -191,7 +191,7 @@ sunnavy  C<< <sunnavy at bestpractical.com> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright 2009 Best Practical Solutions.
+Copyright 2009-2010 Best Practical Solutions.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.

commit 7b2cf51a510eddc72a652102967f71abc3455a9c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 26 16:04:25 2010 +0800

    bump version to 0.06

diff --git a/Changes b/Changes
index 462d832..7b5ceeb 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Net-Lighthouse
 
+0.06
+
 0.05 Fri Mar 26 07:48:36 GMT 2010
     * fixed Moose related issue
 
diff --git a/lib/Net/Lighthouse.pm b/lib/Net/Lighthouse.pm
index 12775f5..74a1ccd 100644
--- a/lib/Net/Lighthouse.pm
+++ b/lib/Net/Lighthouse.pm
@@ -8,7 +8,7 @@ use Net::Lighthouse::Token;
 use Net::Lighthouse::User;
 use base 'Net::Lighthouse::Base';
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 sub project { return shift->_new( 'Project' ) }
 sub user { return shift->_new( 'User' ) }
@@ -51,7 +51,7 @@ Net::Lighthouse - Perl interface to lighthouseapp.com
 
 =head1 VERSION
 
-This document describes Net::Lighthouse version 0.05
+This document describes Net::Lighthouse version 0.06
 
 
 =head1 SYNOPSIS

commit 9f5f34fa0d4ea8ecdfd6d0e50fca9af272d92ba1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 27 13:59:39 2010 +0800

    Mouse doesn't support unknown class union too

diff --git a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
index 2530bc3..efa38f4 100644
--- a/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
+++ b/lib/Net/Lighthouse/Project/Ticket/Attachment.pm
@@ -25,6 +25,12 @@ if ( $INC{'Moose.pm'} ) {
     Moose::Util::TypeConstraints::class_type( 'LWP::UserAgent' );
     Moose::Util::TypeConstraints::class_type( 'Test::MockObject' );
 }
+else {
+    require Mouse::Util::TypeConstraints;
+    Mouse::Util::TypeConstraints::class_type( 'LWP::UserAgent' );
+    Mouse::Util::TypeConstraints::class_type( 'Test::MockObject' );
+}
+
 has 'ua' => ( is => 'ro', isa => 'LWP::UserAgent|Test::MockObject', );
 
 has 'content' => (

commit 147186196ea16306aeb353896882b79a0aa7c527
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 27 14:00:24 2010 +0800

    release 0.06

diff --git a/Changes b/Changes
index 7b5ceeb..07eb382 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Net-Lighthouse
 
-0.06
+0.06 Sat Mar 27 05:52:25 GMT 2010
+    * fix the similar problem for Mouse(0.51+) as the one in 0.05 for Moose
 
 0.05 Fri Mar 26 07:48:36 GMT 2010
     * fixed Moose related issue
diff --git a/META.yml b/META.yml
index 8b63c30..96fa59d 100644
--- a/META.yml
+++ b/META.yml
@@ -32,4 +32,4 @@ requires:
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bestpractical/net-lighthouse.git
-version: 0.05
+version: 0.06

commit 377d20d2b8e1cc4fffb627d563ca3781feceba76
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Mar 27 14:01:14 2010 +0800

    bump version to 0.07

diff --git a/Changes b/Changes
index 07eb382..9952c6f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Net-Lighthouse
 
+0.07
+
 0.06 Sat Mar 27 05:52:25 GMT 2010
     * fix the similar problem for Mouse(0.51+) as the one in 0.05 for Moose
 
diff --git a/META.yml b/META.yml
index 96fa59d..f761f32 100644
--- a/META.yml
+++ b/META.yml
@@ -32,4 +32,4 @@ requires:
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bestpractical/net-lighthouse.git
-version: 0.06
+version: 0.07
diff --git a/lib/Net/Lighthouse.pm b/lib/Net/Lighthouse.pm
index 74a1ccd..12d73c3 100644
--- a/lib/Net/Lighthouse.pm
+++ b/lib/Net/Lighthouse.pm
@@ -8,7 +8,7 @@ use Net::Lighthouse::Token;
 use Net::Lighthouse::User;
 use base 'Net::Lighthouse::Base';
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 sub project { return shift->_new( 'Project' ) }
 sub user { return shift->_new( 'User' ) }
@@ -51,7 +51,7 @@ Net::Lighthouse - Perl interface to lighthouseapp.com
 
 =head1 VERSION
 
-This document describes Net::Lighthouse version 0.06
+This document describes Net::Lighthouse version 0.07
 
 
 =head1 SYNOPSIS

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list