/[Frey]/trunk/lib/Frey/ORM/Field.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/ORM/Field.pm

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

trunk/lib/Continuity/Coro/Moose.pm revision 69 by dpavlin, Wed Jul 9 15:45:59 2008 UTC trunk/lib/Frey/Web/Field.pm revision 146 by dpavlin, Wed Jul 16 21:20:14 2008 UTC
# Line 1  Line 1 
1  package Continuity::Coro::Moose;  package Frey::Web::Field;
2    
3  use Moose::Role;  use Moose::Role;
4  use Coro::Generator;  use Coro::Generator;
5    use Data::UUID;
6    
7  has 'cont'   => (is => 'rw');  has 'cont'   => (is => 'rw');
8  has 'output' => (is => 'rw');  has 'output' => (is => 'rw');
9  has 'input'  => (is => 'rw');  has 'input'  => (is => 'rw');
10    
11    has 'uuid'   => (
12      is      => 'ro',
13      isa     => 'Str',
14      default => sub { Data::UUID->new->create_str }
15    );
16    
17    =head2 field_name
18    
19    Given a name generate a unique field ID
20    
21      my $unique_id = $o->field_name( $name );
22    
23    =cut
24    
25    sub field_name {
26      my ($self, $name) = @_;
27      return $self->uuid . '-' . $name;
28    }
29    
30  sub process {  sub process {
31    my ($self, $input) = @_;    my ($self, $input) = @_;
32    $self->input($input);    $self->input($input);

Legend:
Removed from v.69  
changed lines
  Added in v.146

  ViewVC Help
Powered by ViewVC 1.1.26