Acme-PPIx-MetaSyntactic

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     my $acme = "Acme::PPIx::MetaSyntactic"->new(document => \<<'END');
     use v5.010;
     use constant PLACE => "World";
 
     sub join_spaces {
        return join " ", @_;
     }
 
     my @greetings = qw(Hello);
 
     say join_spaces($greetings[0], PLACE);
     END
 
     say $acme->document;

    Example output:

     use v5.010;
     use constant VULTURE => "World";
 
     sub fraud {
        return join " ", @_;
     }
 
     my @gang_of_thieves = qw(Hello);
 
     say fraud($gang_of_thieves[0], VULTURE);

DESCRIPTION
    This module uses PPI to parse some Perl source code, find all the
    variables and function names defined in it, and reassign them random names
    using Acme::MetaSyntactic.

  Constructor
    This module is object-oriented, though there's really very little reason
    for it to be.

lib/Acme/PPIx/MetaSyntactic.pm  view on Meta::CPAN

 my $acme = "Acme::PPIx::MetaSyntactic"->new(document => \<<'END');
 use v5.010;
 use constant PLACE => "World";
 
 sub join_spaces {
    return join " ", @_;
 }
 
 my @greetings = qw(Hello);
 
 say join_spaces($greetings[0], PLACE);
 END
 
 say $acme->document;

Example output:

 use v5.010;
 use constant VULTURE => "World";
 
 sub fraud {
    return join " ", @_;
 }
 
 my @gang_of_thieves = qw(Hello);
 
 say fraud($gang_of_thieves[0], VULTURE);

=head1 DESCRIPTION

This module uses L<PPI> to parse some Perl source code, find all the
variables and function names defined in it, and reassign them random names
using L<Acme::MetaSyntactic>.

=head2 Constructor

This module is object-oriented, though there's really very little reason



( run in 0.707 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )