Roel van der Steen > FrameMaker-MifTree > IO::Tokenized::Scalar

Download:
FrameMaker-MifTree/FrameMaker-MifTree-0.075.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.05   Source  

NAME ^

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

SYNOPSIS ^

  my $fh = IO::Tokenized::Scalar->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();

NOTE

This is a modified version of IO::Tokenized::File; it has just every occurrence of IO::File replaced by IO::Scalar. The original package is copyright Leo Cacciari; modification by Roel van der Steen <roel-perl@st2x.net>.

DESCRIPTION ^

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

METHODS ^

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

IO::Tokenized::Scalar redefines the following methods:

SEE ALSO ^

IO::Tokenized and IO::Scalar.

AUTHOR ^

Leo Cacciari, <hobbit@cpan.org>

COPYRIGHT AND LICENSE 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.

syntax highlighting: