Changeset 4970 for lang/perl/Moxy/trunk/lib/Moxy.pm
- Timestamp:
- 01/19/08 22:30:13 (5 years ago)
- Files:
-
- 1 modified
-
lang/perl/Moxy/trunk/lib/Moxy.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Moxy/trunk/lib/Moxy.pm
r4944 r4970 16 16 use Carp; 17 17 use Log::Dispatch; 18 use Scalar::Util qw/blessed/; 18 19 my $TERM_ANSICOLOR_ENABLED = eval { use Term::ANSIColor; 1; }; 19 20 … … 174 175 } 175 176 177 sub run_hook_and_get_response { 178 my ($self, $hook, @args) = @_; 179 180 $self->log(debug => "Run hook and get response: $hook"); 181 for my $action (@{$self->{hooks}->{$hook}}) { 182 my $response = $action->($self, @args); 183 return $response if blessed $response && $response->isa('HTTP::Response'); 184 } 185 return; # not finished yet 186 } 187 176 188 sub get_hooks { 177 189 my ($self, $hook) = @_;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)