[Catalyst-commits] r10697 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX lib/CatalystX/CRUD
lib/CatalystX/CRUD/Iterator lib/CatalystX/CRUD/Model
lib/CatalystX/CRUD/ModelAdapter lib/CatalystX/CRUD/Object
lib/CatalystX/CRUD/Test
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Sun Jun 28 02:19:56 GMT 2009
Author: karpet
Date: 2009-06-28 02:19:56 +0000 (Sun, 28 Jun 2009)
New Revision: 10697
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
Log:
tweeks to Model::File search behaviour
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-06-28 02:19:56 UTC (rev 10697)
@@ -220,4 +220,10 @@
0.45 13 June 2009
* fix multi-column sort via cxc-order param (requires Sort::SQL 0.04)
+
+0.46 xxx
+ * tweek Model::File _find to avoid multiple loops over the same list of root dirs.
+ * tweek Model::File->search to read() each object like fetch() does.
+
+
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -37,7 +37,7 @@
naked_results => 0,
);
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -3,7 +3,7 @@
use warnings;
use Carp;
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -4,7 +4,7 @@
use Carp;
use base qw( CatalystX::CRUD );
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -10,10 +10,10 @@
__PACKAGE__->mk_accessors(qw( inc_path ));
-our $VERSION = '0.45';
+our $VERSION = '0.46';
# test whether symlink() works at compile time
-my $SYMLINK_SUPPORTED = eval { symlink("",""); 1 };
+my $SYMLINK_SUPPORTED = eval { symlink( "", "" ); 1 };
=head1 NAME
@@ -169,7 +169,7 @@
{ follow => 1,
wanted => $find_sub,
},
- @{ $self->inc_path }
+ $root
);
return \%files;
}
@@ -185,6 +185,7 @@
file => $relative,
delegate => $files->{$relative}
);
+ $obj->read; # just like fetch()
push @objects, $obj;
}
}
@@ -242,9 +243,9 @@
sub add_related {
my ( $self, $file, $rel_name, $other_file_name ) = @_;
- if (!$SYMLINK_SUPPORTED) {
+ if ( !$SYMLINK_SUPPORTED ) {
$self->context->log->error(
- "symlink() is not supported on this system");
+ "symlink() is not supported on this system");
return;
}
@@ -264,7 +265,7 @@
# if not, create symlink
my $link = $self->object_class->delegate_class->new( $file->dir,
$other_file->basename );
- if (!symlink( "$file", "$link" )) {
+ if ( !symlink( "$file", "$link" ) ) {
$self->throw_error("failed to symlink $link => $file: $@");
}
@@ -292,10 +293,10 @@
sub rm_related {
my ( $self, $file, $rel_name, $other_file_name ) = @_;
- if (!$SYMLINK_SUPPORTED) {
+ if ( !$SYMLINK_SUPPORTED ) {
$self->context->log->error(
- "symlink() is not supported on this system");
- return;
+ "symlink() is not supported on this system");
+ return;
}
my $other_file = $self->fetch( file => $other_file_name );
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_accessors(qw( use_ilike ne_sign ));
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -9,7 +9,7 @@
Catalyst::Model
);
-our $VERSION = '0.45';
+our $VERSION = '0.46';
__PACKAGE__->mk_accessors(qw( object_class page_size ));
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -3,7 +3,7 @@
use warnings;
use base qw( CatalystX::CRUD::ModelAdapter );
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -13,7 +13,7 @@
__PACKAGE__->mk_accessors(qw( content file ));
__PACKAGE__->delegate_class('Path::Class::File');
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -12,7 +12,7 @@
__PACKAGE__->mk_ro_accessors(qw( delegate ));
__PACKAGE__->mk_classdata('delegate_class');
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -10,7 +10,7 @@
__PACKAGE__->mk_accessors(qw( enable_rpc_compat ));
__PACKAGE__->config( enable_rpc_compat => 0 );
-our $VERSION = '0.45';
+our $VERSION = '0.46';
#warn "REST VERSION = $VERSION";
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -8,7 +8,7 @@
__PACKAGE__->mk_ro_accessors(qw( count pager query results ));
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -8,7 +8,7 @@
__PACKAGE__->mk_accessors( qw( form_fields ) );
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -7,7 +7,7 @@
__PACKAGE__->mk_accessors(qw( params fields ));
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-06-27 21:14:15 UTC (rev 10696)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-06-28 02:19:56 UTC (rev 10697)
@@ -4,7 +4,7 @@
use strict;
use Carp;
-our $VERSION = '0.45';
+our $VERSION = '0.46';
=head1 NAME
More information about the Catalyst-commits
mailing list