Leo Cacciari > IO-Tokenized-0.04 > IO::Tokenized::File

Download:
IO-Tokenized-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Module Version: 0.05   Source  

NAME ^

IO::Tokenized::File - Extension of IO::File allowing tokenized input

SYNOPSIS ^

  my $fh = IO::Tokenized::File->new();
  $fh->setparser([num => qr/\d+/],
                 [ident => qr/[a-z_][a-z0-9_]],
                 [op => qr![+*/-]!,\&opname]);

  $fh->open('tokenfile') || die "Can't open 'tokenfile': $1";
  
  while ($t = $fh->gettoken()) {
    ... do something smart...
  }

  $fh->close();

DESCRIPTION ^

IO::Tokenized::File adds the methods provided by IO::Tokenized to IO::File objects. See IO::Tokenized for details about how the tokens are specified and returned.

METHODS ^

IO::Tokenized::File inherits both from IO::tokenized and IO::File, so that methods from both classes are available to IO::Tokenized::File objects.

IO::Tokenized::File redefines the following methods:

SEE ALSO ^

IO::Tokenized and IO::File.

AUTHOR ^

Leo Cacciari, <hobbit@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright 2003 by Leo Cacciari

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.