[Rt-commit] r4271 - in Jifty-DBI/trunk: . inc/ExtUtils inc/Module inc/Module/Install lib/Jifty/DBI

jesse at bestpractical.com jesse at bestpractical.com
Fri Dec 9 01:18:23 EST 2005


Author: jesse
Date: Fri Dec  9 01:18:22 2005
New Revision: 4271

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/META.yml
   Jifty-DBI/trunk/inc/ExtUtils/AutoInstall.pm
   Jifty-DBI/trunk/inc/Module/Install.pm
   Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm
   Jifty-DBI/trunk/inc/Module/Install/Base.pm
   Jifty-DBI/trunk/inc/Module/Install/Can.pm
   Jifty-DBI/trunk/inc/Module/Install/Fetch.pm
   Jifty-DBI/trunk/inc/Module/Install/Include.pm
   Jifty-DBI/trunk/inc/Module/Install/Makefile.pm
   Jifty-DBI/trunk/inc/Module/Install/Metadata.pm
   Jifty-DBI/trunk/inc/Module/Install/Win32.pm
   Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm
   Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
 r19843 at truegrounds:  jesse | 2005-12-08 23:18:13 -0500
 * Forward ported Collection clone method


Modified: Jifty-DBI/trunk/META.yml
==============================================================================
--- Jifty-DBI/trunk/META.yml	(original)
+++ Jifty-DBI/trunk/META.yml	Fri Dec  9 01:18:22 2005
@@ -20,4 +20,4 @@
 no_index:
   directory:
     - inc
-generated_by: Module::Install version 0.37
+generated_by: Module::Install version 0.39

Modified: Jifty-DBI/trunk/inc/ExtUtils/AutoInstall.pm
==============================================================================
--- Jifty-DBI/trunk/inc/ExtUtils/AutoInstall.pm	(original)
+++ Jifty-DBI/trunk/inc/ExtUtils/AutoInstall.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/ExtUtils/AutoInstall.pm - /usr/local/share/perl/5.8.7/ExtUtils/AutoInstall.pm"
+#line 1 "inc/ExtUtils/AutoInstall.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//ExtUtils/AutoInstall.pm"
 package ExtUtils::AutoInstall;
 $ExtUtils::AutoInstall::VERSION = '0.63';
 

Modified: Jifty-DBI/trunk/inc/Module/Install.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install.pm	Fri Dec  9 01:18:22 2005
@@ -1,6 +1,6 @@
-#line 1 "inc/Module/Install.pm - /usr/local/share/perl/5.8.7/Module/Install.pm"
+#line 1 "inc/Module/Install.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install.pm"
 package Module::Install;
-$VERSION = '0.37';
+$VERSION = '0.39';
 
 die << "." unless $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'};
 Please invoke ${\__PACKAGE__} with:

Modified: Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/AutoInstall.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/AutoInstall.pm - /usr/local/share/perl/5.8.7/Module/Install/AutoInstall.pm"
+#line 1 "inc/Module/Install/AutoInstall.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/AutoInstall.pm"
 package Module::Install::AutoInstall;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/Base.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Base.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Base.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Base.pm - /usr/local/share/perl/5.8.7/Module/Install/Base.pm"
+#line 1 "inc/Module/Install/Base.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Base.pm"
 package Module::Install::Base;
 
 #line 28

Modified: Jifty-DBI/trunk/inc/Module/Install/Can.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Can.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Can.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Can.pm - /usr/local/share/perl/5.8.7/Module/Install/Can.pm"
+#line 1 "inc/Module/Install/Can.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Can.pm"
 package Module::Install::Can;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 $VERSION = '0.01';

Modified: Jifty-DBI/trunk/inc/Module/Install/Fetch.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Fetch.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Fetch.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Fetch.pm - /usr/local/share/perl/5.8.7/Module/Install/Fetch.pm"
+#line 1 "inc/Module/Install/Fetch.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Fetch.pm"
 package Module::Install::Fetch;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/Include.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Include.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Include.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Include.pm - /usr/local/share/perl/5.8.7/Module/Install/Include.pm"
+#line 1 "inc/Module/Install/Include.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Include.pm"
 package Module::Install::Include;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/Makefile.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Makefile.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Makefile.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Makefile.pm - /usr/local/share/perl/5.8.7/Module/Install/Makefile.pm"
+#line 1 "inc/Module/Install/Makefile.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Makefile.pm"
 package Module::Install::Makefile;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/Metadata.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Metadata.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Metadata.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Metadata.pm - /usr/local/share/perl/5.8.7/Module/Install/Metadata.pm"
+#line 1 "inc/Module/Install/Metadata.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Metadata.pm"
 package Module::Install::Metadata;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/Win32.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/Win32.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/Win32.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/Win32.pm - /usr/local/share/perl/5.8.7/Module/Install/Win32.pm"
+#line 1 "inc/Module/Install/Win32.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/Win32.pm"
 package Module::Install::Win32;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm
==============================================================================
--- Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm	(original)
+++ Jifty-DBI/trunk/inc/Module/Install/WriteAll.pm	Fri Dec  9 01:18:22 2005
@@ -1,4 +1,4 @@
-#line 1 "inc/Module/Install/WriteAll.pm - /usr/local/share/perl/5.8.7/Module/Install/WriteAll.pm"
+#line 1 "inc/Module/Install/WriteAll.pm - /home/jesse/jifty-build/lib/site_perl/5.8.7//Module/Install/WriteAll.pm"
 package Module::Install::WriteAll;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	Fri Dec  9 01:18:22 2005
@@ -52,6 +52,7 @@
 use vars qw($VERSION);
 
 use Data::Page;
+use Clone;
 use base qw/Class::Accessor/;
 __PACKAGE__->mk_accessors(qw/pager/);
 
@@ -1494,6 +1495,51 @@
     return ( refers_to => $class, %args );
 }
 
+
+=head2 Clone
+
+Returns copy of the current object with all search restrictions.
+
+=cut
+
+sub clone
+{
+    my $self = shift;
+
+    my $obj = bless {}, ref($self);
+    %$obj = %$self;
+
+    delete $obj->{$_} for qw(
+        items
+    );
+    $obj->{'must_redo_search'} = 1;
+    $obj->{'itemscount'}       = 0;
+    
+    $obj->{$_} = Clone::clone($obj->{$_}) for ( $self->_cloned_attributes );
+    return $obj;
+}
+
+=head2 _cloned_attributes
+
+Returns list of the object's fields that should be copied.
+
+If your subclass store references in the object that should be copied while
+clonning then you probably want override this method and add own values to
+the list.
+
+=cut
+ 
+sub _cloned_attributes
+{
+    return qw(
+        aliases
+        left_joins
+        subclauses
+        restrictions
+    );
+ }
+ 
+ 
 1;
 __END__
 


More information about the Rt-commit mailing list