--- trunk/lib/Frey/Run.pm 2008/11/15 23:52:22 348
+++ trunk/lib/Frey/Run.pm 2008/11/16 00:25:39 349
@@ -20,6 +20,10 @@
=cut
+use Moose::Util::TypeConstraints;
+
+enum 'Runnable' => qw/data markup sponge/;
+
sub runnable { qw/data markup sponge/ }
has 'class' => (
@@ -34,6 +38,11 @@
default => sub { {} },
);
+has 'run' => (
+ is => 'rw',
+ isa => 'Runnable',
+);
+
sub html {
my ( $self ) = @_;
@@ -79,8 +88,12 @@
qq||
} @$values
) . qq||;
- } else {
- $value = $attr->default( $name ) if $attr->has_default;
+ } elsif ( $attr->has_type_constraint && $attr->type_constraint->can('values') ) {
+ $value_html = qq||;
+ } elsif ( $attr->has_default ) {
+ $value = $attr->default( $name );
}
$value_html = qq|| unless $value_html;