[Bps-public-commit] r18281 - Net-Trac/trunk/lib/Net/Trac

jesse at bestpractical.com jesse at bestpractical.com
Sun Feb 8 23:37:18 EST 2009


Author: jesse
Date: Sun Feb  8 23:37:18 2009
New Revision: 18281

Modified:
   Net-Trac/trunk/lib/Net/Trac/Ticket.pm

Log:
* Removing MooseX::ClassAttribute

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	Sun Feb  8 23:37:18 2009
@@ -23,7 +23,6 @@
 =cut
 
 use Moose;
-use MooseX::ClassAttribute;
 use Params::Validate qw(:all);
 use Lingua::EN::Inflect qw();
 use DateTime::Format::ISO8601;
@@ -63,13 +62,16 @@
 our $LOADED_UPDATE_METADATA =0;
 
 
-
-class_has valid_milestones  => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
-class_has valid_types       => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
-class_has valid_components  => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
-class_has valid_priorities  => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
-class_has valid_resolutions => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
-class_has valid_severities  => ( isa => 'ArrayRef', is => 'rw', default => sub {[]} );
+our (
+    $_VALID_MILESTONES, $_VALID_TYPES,       $_VALID_COMPONENTS,
+    $_VALID_PRIORITIES, $_VALID_RESOLUTIONS, $_VALID_SEVERITIES
+);
+sub valid_milestones { shift; $_VALID_MILESTONES = shift if (@_); return $_VALID_MILESTONES || [] }
+sub valid_types      { shift; $_VALID_TYPES      = shift if (@_); return $_VALID_TYPES ||[]}
+sub valid_components { shift; $_VALID_COMPONENTS = shift if (@_); return $_VALID_COMPONENTS || [] }
+sub valid_priorities { shift; $_VALID_PRIORITIES = shift if (@_); return $_VALID_PRIORITIES || [] }
+sub valid_resolutions { shift; $_VALID_RESOLUTIONS = shift if (@_); return $_VALID_RESOLUTIONS || []; }
+sub valid_severities { shift; $_VALID_SEVERITIES = shift if (@_); return $_VALID_SEVERITIES || [] }
 
 sub basic_statuses { qw( new accepted assigned reopened closed ) }
 



More information about the Bps-public-commit mailing list