/[papo]/papo/xot/Xot/Field.pm
ViewVC logotype

Diff of /papo/xot/Xot/Field.pm

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

revision 1.2 by jlenton, Thu Jun 12 18:16:15 2003 UTC revision 1.3 by jlenton, Mon Jun 30 03:42:06 2003 UTC
# Line 1  Line 1 
1  package Xot::Field;  package Xot::Field;
2  use Xot::Reference;  use base "Xot::Accessors";
3  use strict;  use strict;
4    
5    Xot::Field->plain(qw(name type table));
6    
7  sub new  sub new
8  {  {
9      my $class = shift;      my ($class, $table, $twig) = splice @_, 0, 3;
     my $twig = shift;  
10    
11      $class = "Xot::Reference"      $class = 'Xot::Reference'
12          if ($twig->att("references"));          if ($twig->att('references'));
13    
14      my $self = bless {}, $class;      my $self = bless {}, $class;
15    
16      $self->init($twig);      $self->init($table, $twig, @_);
17    
18      return $self;      return $self;
19  }  }
20    
21  sub init  sub init
22  {  {
23      my $self = shift;      my ($self, $table, $twig) = splice @_, 0, 3;
24      my $twig = shift;  
25        $self->type($twig->att('type'));
26        $self->name($twig->att('name'));
27        $self->table($table);
28        $self->twig($twig);
29    
 #    printf "\n====================\n";  
 #    $twig->print;  
 #    print "\n====================\n";  
30  }  }
31    
32  1;  1;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26