[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.6,1.7 TmplToken.pm,1.1,1.2

Ambrose Li acli at users.sourceforge.net
Tue Feb 17 06:42:29 CET 2004


Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3053

Modified Files:
	TmplTokenizer.pm TmplToken.pm 
Log Message:
Insert the filename of the token into the TmplToken object too


Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** TmplTokenizer.pm	17 Feb 2004 05:07:04 -0000	1.6
--- TmplTokenizer.pm	17 Feb 2004 05:42:27 -0000	1.7
***************
*** 121,124 ****
--- 121,129 ----
  # Simple getters
  
+ sub filename {
+     my $this = shift;
+     return $this->{+FILENAME};
+ }
+ 
  sub _handle {
      my $this = shift;
***************
*** 356,360 ****
      warn_normal "Unrecognizable token found: $it\n", $this->line_number_start
  	    if $kind eq TmplTokenType::UNKNOWN;
!     return defined $it? (ref $it? $it: TmplToken->new($it, $kind, $this->line_number)): undef;
  }
  
--- 361,365 ----
      warn_normal "Unrecognizable token found: $it\n", $this->line_number_start
  	    if $kind eq TmplTokenType::UNKNOWN;
!     return defined $it? (ref $it? $it: TmplToken->new($it, $kind, $this->line_number, $this->filename)): undef;
  }
  

Index: TmplToken.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplToken.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** TmplToken.pm	17 Feb 2004 02:45:27 -0000	1.1
--- TmplToken.pm	17 Feb 2004 05:42:27 -0000	1.2
***************
*** 33,37 ****
      my $self = {};
      bless $self, $class;
!     ($self->{'_string'}, $self->{'_type'}, $self->{'_lc'}) = @_;
      return $self;
  }
--- 33,37 ----
      my $self = {};
      bless $self, $class;
!     ($self->{'_string'}, $self->{'_type'}, $self->{'_lc'}, $self->{'_path'}) = @_;
      return $self;
  }
***************
*** 47,50 ****
--- 47,55 ----
  }
  
+ sub pathname {
+     my $this = shift;
+     return $this->{'_path'}
+ }
+ 
  sub line_number {
      my $this = shift;





More information about the Koha-cvs mailing list