[Catalyst-commits] r7883 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX/CRUD
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Mon Jun 2 21:40:59 BST 2008
Author: karpet
Date: 2008-06-02 21:40:59 +0100 (Mon, 02 Jun 2008)
New Revision: 7883
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
Log:
check for length instead of defined. this is just to avoid spurious warning about undef value when running under debug
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-06-02 13:34:09 UTC (rev 7882)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-06-02 20:40:59 UTC (rev 7883)
@@ -121,4 +121,5 @@
0.27 xxx
* fix Controller->rm() to check for model_adapter() and call its delete() method as advertised.
+ * check for length($oid) instead of defined($oid) in REST->default
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2008-06-02 13:34:09 UTC (rev 7882)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2008-06-02 20:40:59 UTC (rev 7883)
@@ -110,12 +110,12 @@
sub default : Path {
my ( $self, $c, @arg ) = @_;
- my $oid = shift @arg;
+ my $oid = shift @arg || '';
my $rpc = shift @arg; # RPC compat
$c->log->debug("default OID: $oid") if $c->debug;
my $method = $self->req_method($c);
- if ( !defined $oid && $method eq 'GET' ) {
+ if ( !length $oid && $method eq 'GET' ) {
$c->action->name('list');
$c->action->reverse( join( '/', $c->action->namespace, 'list' ) );
return $self->list($c);
More information about the Catalyst-commits
mailing list