PerlIO::via::UnComment - PerlIO layer for removing comments


PerlIO-via-UnComment documentation  | view source Contained in the PerlIO-via-UnComment distribution.

Index


NAME

Top

PerlIO::via::UnComment - PerlIO layer for removing comments

SYNOPSIS

Top

 use PerlIO::via::UnComment;

 open( my $in,'<:via(UnComment)','file.pm' )
  or die "Can't open file.pm for reading: $!\n";

 open( my $out,'>:via(UnComment)','file.pm' )
  or die "Can't open file.pm for writing: $!\n";

DESCRIPTION

Top

This module implements a PerlIO layer that removes comments (any lines that start with '#') on input and on output. It is intended as a development tool only, but may have uses outside of development.

EXAMPLES

Top

Here are some examples, some may even be useful.

Source only filter, but with pod

A script that only lets uncommented source code and pod pass.

 #!/usr/bin/perl
 use PerlIO::via::UnComment;
 binmode( STDIN,':via(UnComment)' ); # could also be STDOUT
 print while <STDIN>;

Source only filter, even without pod

A script that only lets uncommented source code.

 #!/usr/bin/perl
 use PerlIO::via::UnComment;
 use PerlIO::via::UnPod;
 binmode( STDIN,':via(UnComment):via(UnPod)' ); # could also be STDOUT
 print while <STDIN>;

REQUIRED MODULES

Top

 (none)

SEE ALSO

Top

PerlIO::via, PerlIO::via::UnPod and any other PerlIO::via modules on CPAN.

COPYRIGHT

Top


PerlIO-via-UnComment documentation  | view source Contained in the PerlIO-via-UnComment distribution.