comparison Lib/IMPL/DOM/Schema/Label.pm @ 383:2f16f13b000c

DOM localization
author cin
date Thu, 23 Jan 2014 17:26:34 +0400
parents ced5937ff21a
children 5aff94ba842f
comparison
equal deleted inserted replaced
382:99ac2e19c0cc 383:2f16f13b000c
25 25
26 die ArgException->new('map' => 'A strings map is required') 26 die ArgException->new('map' => 'A strings map is required')
27 unless $map; 27 unless $map;
28 die ArgException->new('id' => 'A lable identifier is required') 28 die ArgException->new('id' => 'A lable identifier is required')
29 unless $id; 29 unless $id;
30
31 $this->_map($map);
32 $this->_id($id);
30 } 33 }
31 34
32 our $AUTOLOAD; 35 our $AUTOLOAD;
33 sub AUTOLOAD { 36 sub AUTOLOAD {
34 my ($this) = @_; 37 my ($this) = @_;
35 38
36 my ($method) = ($AUTOLOAD =~ /(\w+)$/); 39 my ($method) = ($AUTOLOAD =~ /(\w+)$/);
37 return 40 return
38 if $method eq 'DESTROY'; 41 if $method eq 'DESTROY';
39 42
40 return $this->new($this->_map,$method); 43 warn $this->_id . ".$method";
44
45 return $this->new($this->_map,$this->_id . ".$method");
41 } 46 }
42 47
43 sub ToString { 48 sub ToString {
44 my ($this) = @_; 49 my ($this) = @_;
45 return $this->_map->GetString($this->_id); 50 return $this->_map->GetString($this->_id);