[Jifty-commit] r3023 - Jifty-DBI/trunk/lib/Jifty/DBI

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Mar 18 14:26:39 EDT 2007


Author: sky
Date: Sun Mar 18 14:26:38 2007
New Revision: 3023

Modified:
   Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm

Log:
Remove duplicate active sub

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm	Sun Mar 18 14:26:38 2007
@@ -65,7 +65,7 @@
     elsif ( not $self->_checked_for_validate_sub and not $self->_validator ) {
         my $name = ( $self->aliased_as ? $self->aliased_as : $self->name );
         my $can  = $self->record_class->can( "validate_" . $name );
-        
+
         $self->_validator( $can ) if $can;
         $self->_checked_for_validate_sub( 1 );
     }
@@ -123,47 +123,4 @@
     return 1;
 }
 
-=head2 active
-
-Returns the a true value if the column method exists for the current application
-version. The current application version is determined by checking the L<Jifty::DBI::Record/schema_version> of the column's L</record_class>. This method returns a false value if the column is not yet been added or has been dropped.
-
-This method returns a false value under these circumstances:
-
-=over
-
-=item *
-
-Both the C<since> trait and C<schema_version> method are defined and C<schema_version> is less than the version set on C<since>.
-
-=item *
-
-Both the C<till> trait and C<schema_version> method are defined and C<schema_version> is greater than or equal to the version set on C<till>.
-
-=back
-
-Otherwise, this method returns true.
-
-=cut
-
-sub active {
-    my $self    = shift;
-
-    return 1 unless $self->record_class->can('schema_version');
-    return 1 unless defined $self->record_class->schema_version;
-
-    my $version = version->new($self->record_class->schema_version);
-
-    # The application hasn't yet started using this column
-    return 0 if defined $self->since
-            and $version < version->new($self->since);
-
-    # The application stopped using this column
-    return 0 if defined $self->till
-            and $version >= version->new($self->till);
-
-    # The application currently uses this column
-    return 1;
-}
-
 1;


More information about the Jifty-commit mailing list