Sprog::Gear::Grep.3pm

Langue: en

Autres versions - même langue

Version: 2005-07-26 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Sprog::Gear::Grep - A pattern match filter

DESCRIPTION

This is a filter gear. It uses 'pipe' connectors for both input and output, reads a line at a time and either discards each line or passes it down to the next gear depending on whether the line matched a pattern (regex). The user can choose to include or exclude lines which match the pattern and can chose to make the matching case sensitive or insensitive.

METHODS

line ( data )

If the string in "data" matches the configured pattern, it will be passed to the "data" method of the next gear.

dialog_xml ( )

Returns a Glade dialog definition, including one entry box for specifying the pattern and checkboxes for enabling case-insensitive matches and reversing the sense of the match.

SEE ALSO

The Sprog::Mixin::InputByLine mixin class is used to convert "data" messages to calls to the "line" method.

All other methods are inherited from Sprog::Gear.

Copyright 2004-2005 Grant McLean <grantm@cpan.org>

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