[Jifty-commit] r6747 - jifty/trunk/lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Thu Apr 9 18:37:47 EDT 2009
Author: alexmv
Date: Thu Apr 9 18:37:47 2009
New Revision: 6747
Modified:
jifty/trunk/lib/Jifty/API.pm
Log:
Document Jifty::API->all_actions
Modified: jifty/trunk/lib/Jifty/API.pm
==============================================================================
--- jifty/trunk/lib/Jifty/API.pm (original)
+++ jifty/trunk/lib/Jifty/API.pm Thu Apr 9 18:37:47 2009
@@ -49,7 +49,9 @@
=head1 DESCRIPTION
-You can fetch an instance of this class by calling L<Jifty/api> in your application. This object can be used to examine the actions available within your application and manage access to those actions.
+You can fetch an instance of this class by calling L<Jifty/api> in
+your application. This object can be used to examine the actions
+available within your application and manage access to those actions.
=cut
@@ -65,7 +67,8 @@
Creates a new C<Jifty::API> object.
-Don't use this, see L<Jifty/api> to access a reference to C<Jifty::API> in your application.
+Don't use this, see L<Jifty/api> to access a reference to
+C<Jifty::API> in your application.
=cut
@@ -90,26 +93,6 @@
return ($self);
}
-# Plugin actions under Jifty::Plugin::*::Action are mirrored under
-# AppName::Action by Jifty::ClassLoader; this code makes all_actions
-# reflect this mirroring.
-sub all_actions {
- my $self = shift;
- unless ( $self->{all_actions} ) {
- my @actions = $self->__actions;
- my %seen;
- $seen{$_}++ for @actions;
- for (@actions) {
- if (/^Jifty::Plugin::(.*)::Action::(.*)$/) {
- my $classname = Jifty->app_class( Action => $2 );
- push @actions, $classname unless $seen{$classname};
- }
- }
- $self->{all_actions} = \@actions;
- }
- return @{ $self->{all_actions} };
-}
-
=head2 qualify ACTIONNAME
Returns the fully qualified package name for the given provided
@@ -411,11 +394,40 @@
return $str;
}
+=head2 all_actions
+
+Lists the class names of all actions for this Jifty application,
+regardless of which are allowed or hidden. See also L</actions> and
+L</visible_actions>.
+
+=cut
+
+# Plugin actions under Jifty::Plugin::*::Action are mirrored under
+# AppName::Action by Jifty::ClassLoader; this code makes all_actions
+# reflect this mirroring.
+sub all_actions {
+ my $self = shift;
+ unless ( $self->{all_actions} ) {
+ my @actions = $self->__actions;
+ my %seen;
+ $seen{$_}++ for @actions;
+ for (@actions) {
+ if (/^Jifty::Plugin::(.*)::Action::(.*)$/) {
+ my $classname = Jifty->app_class( Action => $2 );
+ push @actions, $classname unless $seen{$classname};
+ }
+ }
+ $self->{all_actions} = \@actions;
+ }
+ return @{ $self->{all_actions} };
+}
+
=head2 actions
Lists the class names of all of the B<allowed> actions for this Jifty
application; this may include actions under the C<Jifty::Action::>
-namespace, in addition to your application's actions.
+namespace, in addition to your application's actions. See also
+L</all_actions> and L</visible_actions>.
=cut
@@ -428,7 +440,8 @@
Lists the class names of all of the B<visible> actions for this Jifty
application; this may include actions under the C<Jifty::Action::>
-namespace, in addition to your application's actions.
+namespace, in addition to your application's actions. See also
+L</all_actions> and L</actions>.
=cut
More information about the Jifty-commit
mailing list