ifdef

 view release on metacpan or  search on metacpan

lib/ifdef.pm  view on Meta::CPAN

# process
#
# Process a string (consisting of many lines)
#
#  IN: 1 string to process
# OUT: 1 processed string (in place change if called in void context)

sub process {

    # process all lines
    my @line= split m#(?<=$/)#, $_[0];
    &reset;
    local $_= \my $foo;
    &oneline foreach @line;

    # close of activating section (e.g. when called by "load")
    push @line,"}$/" if $ACTIVATING;

    # return if not in void context
    return join( '', @line ) if defined wantarray;



( run in 1.024 second using v1.01-cache-2.11-cpan-71847e10f99 )