[Jifty-commit] r2061 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Oct 24 15:29:46 EDT 2006
Author: audreyt
Date: Tue Oct 24 15:29:45 2006
New Revision: 2061
Modified:
jifty/trunk/lib/Jifty/Action.pm
jifty/trunk/lib/Jifty/Web.pm
Log:
* Rename generate_auto_moniker into _generate_moniker.
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Tue Oct 24 15:29:45 2006
@@ -125,7 +125,7 @@
if ($args{'moniker'}) {
$self->moniker($args{'moniker'});
} else {
- $self->moniker($self->generate_auto_moniker);
+ $self->moniker($self->_generate_moniker);
}
$self->order($args{'order'});
@@ -146,7 +146,7 @@
return $self;
}
-=head2 generate_auto_moniker
+=head2 _generate_moniker
Construct an moniker for a new (or soon-to-be-constructed) action that did not have
an explicit moniker specified. The algorithm is simple: We snapshot the call stack,
@@ -158,7 +158,7 @@
=cut
-sub generate_auto_moniker {
+sub _generate_moniker {
my $self = shift;
use Digest::MD5 qw(md5_hex);
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Tue Oct 24 15:29:45 2006
@@ -428,7 +428,8 @@
# Prepend the base path (probably "App::Action") unless it's there already
$class = Jifty->api->qualify($class);
- $args{moniker} ||= $class->generate_auto_moniker;
+ my $loaded = Jifty::Util->require( $class );
+ $args{moniker} ||= ($loaded ? $class : 'Jifty::Action')->_generate_moniker;
my $action_in_request = $self->request->action( $args{moniker} );
@@ -441,7 +442,7 @@
# The implementation class is provided by the client, so this
# isn't a "shouldn't happen"
- return unless Jifty::Util->require( $class );
+ return unless $loaded;
my $action;
# XXX TODO bullet proof
More information about the Jifty-commit
mailing list