Sprog::Gear::PerlCodeHP.3pm

Langue: en

Autres versions - même langue

Version: 2005-05-23 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Sprog::Gear::PerlCode - convert 'record' data to 'pipe' data via Perl code

DESCRIPTION

This gear allows the user to define a snippet of Perl code that will examine the input records and produce a 'pipe' output stream.

The user-supplied code snippet is wrapped with a small amount of boilerplate code:

   $r = \%rec;
 
   RECORD: {
     # Perl snippet here
   }
 
 

The default behaviour is to produce no output at all.

The input record is available in both the hash %rec and the hashref $r (one is an alias for the other). The user-supplied code should use "print" to send data to the next downstream 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.