Lines Matching refs:self

45     my $self = {
54 bless($self, $class);
58 $self->ReadFile($filename);
60 return $self;
68 my ($self, @data) = @_;
73 $self->{'is_valid'} = 0;
77 $self->{'columns'} = [];
78 $self->{'column_specs'} = [];
83 push @{$self->{'columns'}}, $name;
84 push @{$self->{'column_specs'}}, $spec;
93 my ($self, @index_columns) = @_;
95 $self->{'index_columns'} = [@index_columns];
103 my ($self, $codepage) = @_;
105 $self->{'codepage'} = $codepage;
113 my ($self) = @_;
114 return $self->{'is_valid'};
139 my ($self, $filename) = @_;
144 $self->{'is_valid'} = 0;
151 $self->{'columns'} = [split(/\t/, $columns)];
154 $self->{'column_specs'} = [split(/\t/, $column_specs)];
160 if ($item_count>=1 && $items[0] eq $self->{'name'})
164 elsif ($item_count>=2 && $items[1] eq $self->{'name'})
166 $self->{'codepage'} = shift @items;
170 … printf STDERR ("reading wrong table data for table '%s' (got %s)\n", $self->{'name'}, $items[0]);
171 $self->{'is_valid'} = 0;
175 $self->{'index_columns'} = [@items];
176 $self->{'index_column_index'} = $self->GetColumnIndex($items[0]);
185 push @$rows, new installer::patch::MsiRow($self, @items);
187 $self->{'rows'} = $rows;
189 return $self;
202 my ($self, $filename) = @_;
204 open my $out, ">".$self->{'filename'};
206 print $out join("\t", @{$self->{'columns'}})."\r\n";
207 print $out join("\t", @{$self->{'column_specs'}})."\r\n";
208 if (defined $self->{'codepage'})
210 print $out $self->{'codepage'} . "\t";
212 print $out $self->{'name'} . "\t";
213 print $out join("\t",@{$self->{'index_columns'}})."\r\n";
215 foreach my $row (@{$self->{'rows'}})
228 my $self = shift;
230 utime(undef,undef, $self->{'filename'});
238 my $self = shift;
240 return $self->{'name'};
253 my ($self) = @_;
255 return scalar @{$self->{'columns'}};
268 my ($self) = @_;
270 return scalar @{$self->{'rows'}};
285 my ($self, $column_name) = @_;
288 foreach my $name (@{$self->{'columns'}})
297 …printf STDERR ("did not find column %s in %s\n", $column_name, join(" and ", @{$self->{'columns'}}…
313 my ($self, $index_column_index, $index_column_value) = @_;
315 my $rows = $self->{'rows'};
340 my ($self, $selector_column, $selector_column_value, $value_column) = @_;
342 my $row = $self->GetRow($selector_column, $selector_column_value);
363 my ($self, $column, $value) = @_;
365 my $column_index = $self->GetColumnIndex($column);
368 printf STDERR "ERROR: unknown column $column in table $self->{'name'}\n";
372 foreach my $row (@{$self->{'rows'}})
383 table $self->{'name'});
399 my $self = shift;
401 return $self->{'rows'};
420 my $self = shift;
424 my $index_column = $self->{'index_columns'}->[0];
440 my $column_index = $self->GetColumnIndex($column_name);
444 my $index_column_index = $self->GetColumnIndex($index_column);
445 my $row_index = $self->GetRowIndex($index_column_index, $items[$index_column_index]);
450 push @{$self->{'rows'}}, installer::patch::MsiRow->new($self, @items);
455 $self->{'rows'}->[$row_index] = installer::patch::MsiRow->new($self, @items);
458 $self->MarkAsModified();
466 my $self = shift;
468 $self->{'is_modified'} = 1;
476 my $self = shift;
478 $self->{'is_modified'} = 0;
486 my $self = shift;
488 return $self->{'is_modified'};