App-PPI-Dumper

 view release on metacpan or  search on metacpan

lib/App/PPI/Dumper.pm  view on Meta::CPAN

use Getopt::Std qw(getopts);
use PPI;
use PPI::Dumper;

__PACKAGE__->run(@ARGV) unless caller;

# same defaults as PPI::Dumper
sub run {
	my $self = shift;

	local @ARGV = @_;

	my %opts = (
		'm' => 0, # memaddr
		'i' => 2, # indent
		'P' => 0, # class
		'D' => 0, # content
		'W' => 0, # whitespace
		'C' => 0, # comments
		'l' => 0, # locations
		'r' => 0, # read-only, for PPI::Document

t/run.t  view on Meta::CPAN

foreach my $regression ( @regressions )
	{
	my( $argv, $output_file ) = @$regression;

	ok( -e $argv->[-1], "Input file $argv->[-1] exists" );

	my $basename = basename( $argv->[-1] );

	ok( -e $output_file, "Regression file $output_file exists" );

	my $expected_output = do { local( @ARGV, $/ ) = $output_file; <> };

	stdout_is(
		sub { $class->run( @$argv ) },
		$expected_output,
		"Trying " . join( " ", @$argv )
		);

	}

# 	[ [ qw(-m corpus/hello.pl) ],   qw(regression/hello-m.pl) ],

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.385 second using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b )