diff options
| author | fukachan <fukachan> | 2003-05-26 12:28:05 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-05-26 12:28:05 +0000 |
| commit | 464c48f77ee591bfd538dab1bc8faf49a205e217 (patch) | |
| tree | 22982b401bc661a79bade6fcbeaaaf5d23d39c78 /fml/lib/IO/Adapter/File.pm | |
| parent | 00641610acad3d3e3f121faa37b2ce0cbbaa171e (diff) | |
| download | fml8-464c48f77ee591bfd538dab1bc8faf49a205e217.tar.gz fml8-464c48f77ee591bfd538dab1bc8faf49a205e217.tar.bz2 fml8-464c48f77ee591bfd538dab1bc8faf49a205e217.zip | |
remove not used method:
- get_value_as_str()
- get_value_as_array_ref()
Diffstat (limited to 'fml/lib/IO/Adapter/File.pm')
| -rw-r--r-- | fml/lib/IO/Adapter/File.pm | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm index 2d4338ea..2cede934 100644 --- a/fml/lib/IO/Adapter/File.pm +++ b/fml/lib/IO/Adapter/File.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: File.pm,v 1.44 2003/01/11 15:22:26 fukachan Exp $ +# $FML: File.pm,v 1.45 2003/02/01 08:48:07 fukachan Exp $ # package IO::Adapter::File; @@ -266,89 +266,6 @@ sub _get_next_xxx } -=head2 get_value_as_str($key) - -return value(s) for the next key as STR. - -=head2 get_value_as_array_ref($key) - -return value(s) for the next key as ARRAY_REF. - -=cut - - -# Descriptions: return value(s) for the next key -# Arguments: OBJ($self) STR($key) -# Side Effects: none -# Return Value: STR -sub get_value_as_str -{ - my ($self, $key) = @_; - $self->_get_value($key, 'value_as_array_str'); -} - - -# Descriptions: return value(s) for the next key -# Arguments: OBJ($self) STR($key) -# Side Effects: none -# Return Value: ARRAY_REF -sub get_value_as_array_ref -{ - my ($self, $key) = @_; - $self->_get_value($key, 'value_as_array_ref'); -} - - -# Descriptions: return value(s) for the next key. -# XXX "key" should be uniq since "key" is used as a primary key. -# Arguments: OBJ($self) STR($key) STR($style) -# Side Effects: none -# Return Value: STR or ARRAY_REF -sub _get_value -{ - my ($self, $key, $style) = @_; - my $xkey = ''; - my $buf = ''; - my $curpos = $self->getpos(); - - my $fh = $self->{_fh}; - if (defined $fh) { - my $xbuf; - - $self->setpos(0); - - LOOP: - while ($xbuf = <$fh>) { - ($xkey, $buf) = split(/\s+/, $xbuf, 2); - if ($key eq $xkey) { last LOOP;} - } - - $fh->close(); - - if ($style eq 'value_as_str') { - return $buf - } - - if ($style eq 'value_as_array_ref') { - $buf =~ s/^\s*//; - $buf =~ s/\s*$//; - my @a = split(/\s+/, $buf); - - $self->setpos( $curpos ); - return \@a; - } - - } - else { - carp("cannot defined \$fh"); - } - - - $self->setpos( $curpos ); - return $buf; -} - - =head2 C<getpos()> get the position in the opened file. |
