[Bps-public-commit] r18300 - in Net-Trac/trunk: . lib/Net/Trac t

jesse at bestpractical.com jesse at bestpractical.com
Mon Feb 9 11:57:13 EST 2009


Author: jesse
Date: Mon Feb  9 11:57:13 2009
New Revision: 18300

Modified:
   Net-Trac/trunk/META.yml
   Net-Trac/trunk/Makefile.PL
   Net-Trac/trunk/lib/Net/Trac.pm
   Net-Trac/trunk/lib/Net/Trac/Connection.pm
   Net-Trac/trunk/lib/Net/Trac/Mechanize.pm
   Net-Trac/trunk/lib/Net/Trac/Ticket.pm
   Net-Trac/trunk/lib/Net/Trac/TicketAttachment.pm
   Net-Trac/trunk/lib/Net/Trac/TicketHistory.pm
   Net-Trac/trunk/lib/Net/Trac/TicketHistoryEntry.pm
   Net-Trac/trunk/lib/Net/Trac/TicketPropChange.pm
   Net-Trac/trunk/lib/Net/Trac/TicketSearch.pm
   Net-Trac/trunk/t/search.t

Log:
* Switch to Any::Moose, so we can use Mouse for memory and cpu savings!


Modified: Net-Trac/trunk/META.yml
==============================================================================
--- Net-Trac/trunk/META.yml	(original)
+++ Net-Trac/trunk/META.yml	Mon Feb  9 11:57:13 2009
@@ -14,13 +14,11 @@
     - inc
     - t
 requires:
+  Any::Moose: 0
   DateTime::Format::ISO8601: 0
   IO::Scalar: 0
   LWP::Simple: 0
   Lingua::EN::Inflect: 0
-  Moose: 0
-  Moose::Util::TypeConstraints: 0
-  MooseX::ClassAttribute: 0
   Params::Validate: 0
   Text::CSV_XS: 0
   URI: 0

Modified: Net-Trac/trunk/Makefile.PL
==============================================================================
--- Net-Trac/trunk/Makefile.PL	(original)
+++ Net-Trac/trunk/Makefile.PL	Mon Feb  9 11:57:13 2009
@@ -6,9 +6,7 @@
 all_from 'lib/Net/Trac.pm';
 license  'perl';
 
-requires 'Moose';
-requires 'MooseX::ClassAttribute';
-requires 'Moose::Util::TypeConstraints';
+requires 'Any::Moose';
 requires 'URI';
 requires 'IO::Scalar';
 requires 'XML::Feed';

Modified: Net-Trac/trunk/lib/Net/Trac.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac.pm	Mon Feb  9 11:57:13 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 package Net::Trac;
-use Moose;
+use Any::Moose;
 
 our $VERSION = '0.05';
 

Modified: Net-Trac/trunk/lib/Net/Trac/Connection.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/Connection.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/Connection.pm	Mon Feb  9 11:57:13 2009
@@ -24,7 +24,7 @@
 
 =cut
 
-use Moose;
+use Any::Moose;
 
 use XML::Feed;
 use URI;
@@ -258,6 +258,6 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/Mechanize.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/Mechanize.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/Mechanize.pm	Mon Feb  9 11:57:13 2009
@@ -14,7 +14,7 @@
 
 =cut
 
-use Moose;
+use Any::Moose;
 extends 'WWW::Mechanize';
 
 =head1 ACCESSORS / MUTATORS
@@ -52,6 +52,6 @@
 # This is commented because it breaks the class, causing it to
 # seemingly not follow HTTP redirects.
 #__PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/Ticket.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/Ticket.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/Ticket.pm	Mon Feb  9 11:57:13 2009
@@ -22,7 +22,7 @@
 
 =cut
 
-use Moose;
+use Any::Moose;
 use Params::Validate qw(:all);
 use Lingua::EN::Inflect qw();
 use DateTime::Format::ISO8601;
@@ -336,7 +336,7 @@
     );
     my $reply = $self->connection->mech->response;
     if ( $reply->is_success ) {
-        delete $self->{history}; # ICK. I really want a Moose "reset to default"
+        delete $self->{history}; # ICK. I really want a Any::Moose "reset to default"
         return $self->load($self->id);
     }
     else {
@@ -419,7 +419,7 @@
 
     my $reply = $self->connection->mech->response;
     $self->connection->_warn_on_error( $reply->base->as_string ) and return;
-    delete $self->{history}; # ICK. I really want a Moose "reset to default"
+    delete $self->{history}; # ICK. I really want a Any::Moose "reset to default"
 
     return $self->attachments->[-1];
 }
@@ -551,7 +551,7 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;
 

Modified: Net-Trac/trunk/lib/Net/Trac/TicketAttachment.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/TicketAttachment.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/TicketAttachment.pm	Mon Feb  9 11:57:13 2009
@@ -3,7 +3,7 @@
 
 package Net::Trac::TicketAttachment;
 
-use Moose;
+use Any::Moose;
 use DateTime::Format::ISO8601;
 
 =head1 NAME
@@ -111,6 +111,6 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/TicketHistory.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/TicketHistory.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/TicketHistory.pm	Mon Feb  9 11:57:13 2009
@@ -3,7 +3,7 @@
 
 package Net::Trac::TicketHistory;
 
-use Moose;
+use Any::Moose;
 use Params::Validate qw(:all);
 use Net::Trac::TicketHistoryEntry;
 
@@ -91,6 +91,6 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/TicketHistoryEntry.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/TicketHistoryEntry.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/TicketHistoryEntry.pm	Mon Feb  9 11:57:13 2009
@@ -3,7 +3,7 @@
 
 package Net::Trac::TicketHistoryEntry;
 
-use Moose;
+use Any::Moose;
 use Net::Trac::TicketPropChange;
 
 =head1 NAME
@@ -171,6 +171,6 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/TicketPropChange.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/TicketPropChange.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/TicketPropChange.pm	Mon Feb  9 11:57:13 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 package Net::Trac::TicketPropChange;
-use Moose;
+use Any::Moose;
 
 =head1 NAME
 
@@ -35,6 +35,6 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;

Modified: Net-Trac/trunk/lib/Net/Trac/TicketSearch.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/TicketSearch.pm	(original)
+++ Net-Trac/trunk/lib/Net/Trac/TicketSearch.pm	Mon Feb  9 11:57:13 2009
@@ -2,7 +2,7 @@
 use warnings;
 
 package Net::Trac::TicketSearch;
-use Moose;
+use Any::Moose;
 use Params::Validate qw(:all);
 use URI::Escape qw(uri_escape);
 
@@ -157,7 +157,7 @@
 =cut
 
 __PACKAGE__->meta->make_immutable;
-no Moose;
+no Any::Moose;
 
 1;
 

Modified: Net-Trac/trunk/t/search.t
==============================================================================
--- Net-Trac/trunk/t/search.t	(original)
+++ Net-Trac/trunk/t/search.t	Mon Feb  9 11:57:13 2009
@@ -37,21 +37,21 @@
 
 # Ticket 2
 can_ok($ticket => 'create');
-ok($ticket->create(summary => 'Summary #2', description => 'Moose?'));
+ok($ticket->create(summary => 'Summary #2', description => 'Any::Moose?'));
 can_ok($ticket, 'load');
 ok($ticket->load(2));
 like($ticket->state->{'summary'}, qr/Summary #2/);
 like($ticket->summary, qr/Summary #2/, "The summary looks correct");
-like($ticket->description, qr/Moose/, "The description looks correct");
+like($ticket->description, qr/Any::Moose/, "The description looks correct");
 
 # Ticket 3
 can_ok($ticket => 'create');
-ok($ticket->create(summary => 'Summary moose #3', description => 'Moose!'));
+ok($ticket->create(summary => 'Summary moose #3', description => 'Any::Moose!'));
 can_ok($ticket, 'load');
 ok($ticket->load(3));
 like($ticket->state->{'summary'}, qr/Summary moose #3/);
 like($ticket->summary, qr/Summary moose #3/, "The summary looks correct");
-like($ticket->description, qr/Moose/, "The description looks correct");
+like($ticket->description, qr/Any::Moose/, "The description looks correct");
 ok($ticket->update( status => 'reopened' ), "Status = reopened");
 is($ticket->status, 'reopened', "Set status");
 



More information about the Bps-public-commit mailing list