[Jifty-commit] r853 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Apr 12 23:39:53 EDT 2006
Author: alexmv
Date: Wed Apr 12 23:39:52 2006
New Revision: 853
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Action.pm
jifty/trunk/lib/Jifty/Object.pm
Log:
r12296 at zoq-fot-pik: chmrr | 2006-04-12 23:39:32 -0400
* Actions get automagic current_user's too
* Update POD to match reality
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Wed Apr 12 23:39:52 2006
@@ -78,6 +78,8 @@
sticky_on_failure => 1,
@_);
+ $self->_get_current_user;
+
$self->moniker($args{'moniker'} || 'auto-'.Jifty->web->serial);
$self->order($args{'order'});
$self->argument_values( { %{ $args{'arguments'} } } );
Modified: jifty/trunk/lib/Jifty/Object.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Object.pm (original)
+++ jifty/trunk/lib/Jifty/Object.pm Wed Apr 12 23:39:52 2006
@@ -15,9 +15,8 @@
individual classes to overload these methods.
We ought to be able to mix-in C<Jifty::Object> with any other class;
-thus, we will not define C<new> or C<_init> in C<Jifty::Object>, and
-we will not make any assumptions about the underlying representation
-of C<$self>.
+thus, we will not define C<new> or C<_init> in C<Jifty::Object>. We
+do assume, however, that C<$self> is a blessed hash reference.
=cut
@@ -33,9 +32,7 @@
sub current_user {
my $self = shift;
$self->{'_current_user'} = shift if (@_);
- Carp::croak unless (ref $self);
return($self->{'_current_user'});
-
}
=for private _get_current_user
More information about the Jifty-commit
mailing list