B-DeparseTree

 view release on metacpan or  search on metacpan

lib/B/DeparseTree/PPfns.pm  view on Meta::CPAN

					 "%c =~ ${core_s}%c$flags",
					 undef,
					 [$var, $find_replace_re],
					 {maybe_parens => [$self, $cx, 20]});
    } else {
	return $self->info_from_string("s///", $op, "${core_s}${find_replace_re}$flags");
    }
    Carp::confess("unhandled condition in pp_subst");
}

# This handles the category of unary operators, e.g. alarm(), caller(),
# close()..
sub unop
{
    my($self, $op, $cx, $name, $nollafr) = @_;
    my $kid;
    my $opts = {};
    if ($op->flags & B::OPf_KIDS) {
	my $parent = $op;
	$kid = $op->first;
 	if (not $name) {

lib/B/DeparseTree/TreeMain.pm  view on Meta::CPAN

        }
	$self->B::Deparse::stash_subs();
	local($SIG{"__DIE__"}) =
	    sub {
		if ($self->{'curcop'}) {
		    my $cop = $self->{'curcop'};
		    my($line, $file) = ($cop->line, $cop->file);
		    print STDERR "While deparsing $file near line $line,\n";
		}
		use Data::Printer;
		my @bt = caller(1);
		p @bt;
	    };
	$self->{'curcv'} = main_cv;
	$self->{'curcvlex'} = undef;
	print $self->extract_prototypes;
	@{$self->{'subs_todo'}} =
	  sort {$a->[0] <=> $b->[0]} @{$self->{'subs_todo'}};
	my $root = main_root;
        local $B::overlay = {};

t/roundtrip/test.pl  view on Meta::CPAN

	_diag $msg;
	_diag @mess;
    }

    $test = $test + 1; # don't use ++

    return $pass;
}

sub _where {
    my @caller = caller($Level);
    return "at $caller[1] line $caller[2]";
}

# DON'T use this for matches. Use like() instead.
sub ok ($@) {
    my ($pass, $name, @mess) = @_;
    _ok($pass, _where(), $name, @mess);
}

sub _q {



( run in 0.370 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )