Changeset 75 in text-formbuilder for trunk/lib/Class


Ignore:
Timestamp:
03/25/05 12:03:52 (20 years ago)
Author:
peichman
Message:

completed and documented the parse_handle method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Class/ParseText/Base.pm

    r55 r75  
    4949} 
    5050 
    51 #TODO: get this working 
    5251sub parse_handle { 
    5352    my ($self, $fh) = @_; 
     
    5756     
    5857    my $src; 
    59     while ($_ = readline($fh)) { $src .= $_ } 
    60     warn $src; 
     58    local $/ = undef; 
     59    $src = readline($fh); 
     60    close $fh; 
    6161    return $self->parse_text($src); 
    6262} 
     
    152152Parses the contents of of the file C<$filename>. Returns the parser object. 
    153153 
     154=head2 parse_handle 
     155 
     156    $p->parse_handle($fh); 
     157 
     158Slurps the remainder of the file handle C<$fh> and parses the contents. 
     159Returns the parser object. 
     160 
    154161=head2 parse_array 
    155162 
Note: See TracChangeset for help on using the changeset viewer.