/[Frey]/trunk/lib/Frey/Run.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Run.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 285 by dpavlin, Wed Nov 5 08:20:57 2008 UTC revision 317 by dpavlin, Wed Nov 5 22:05:02 2008 UTC
# Line 1  Line 1 
1  package Frey::Run;  package Frey::Run;
2  use Moose;  use Moose;
3  extends 'Frey';  extends 'Frey::ClassLoader';
4  with 'Frey::Web';  with 'Frey::Web';
5  with 'Frey::Config';  with 'Frey::Config';
6  with 'Frey::Escape';  with 'Frey::Escape';
# Line 12  Frey::Run - display required form field Line 12  Frey::Run - display required form field
12  =head1 DESCRIPTION  =head1 DESCRIPTION
13    
14  This object will try to run other Moose objects from your application. It  This object will try to run other Moose objects from your application. It
15  will try to invoke C<data>, C<html> or C<markup> method on the.  will try to invoke C<data>, and C<markup> method on the.
16    
17  =cut  =cut
18    
19  sub execute { qw/data markup/ }  sub runnable { qw/data markup/ }
20    
21  has 'class' => (  has 'class' => (
22          is => 'rw',          is => 'rw',
# Line 37  sub html { Line 37  sub html {
37    
38          my $class = $self->class;          my $class = $self->class;
39    
40            $self->load_class( $class );
41    
42          my @required =          my @required =
43                  grep {                  grep {
44                          defined $_ && $_->can('name') && !defined( $self->params->{ $_->name } )                          defined $_ && $_->can('name') && !defined( $self->params->{ $_->name } )
# Line 50  sub html { Line 52  sub html {
52    
53          my $html;          my $html;
54          my $values = {};          my $values = {};
55          my $values = $self->config($class) if $self->can('config');          $values = $self->config($class) if $self->can('config');
56    
57          if ( @required ) {          if ( @required ) {
58                  $html = qq|<h1>Required params for $class</h1><form method="post">|;                  $html = qq|<h1>Required params for $class</h1><form method="post">|;

Legend:
Removed from v.285  
changed lines
  Added in v.317

  ViewVC Help
Powered by ViewVC 1.1.26