Acme-Pills

 view release on metacpan or  search on metacpan

lib/Acme/Pills.pm  view on Meta::CPAN


sub breaks_when_needed
{
	my ($module, $modfile) = @_;

	my    $file;
	local @INC = @INC;

	for my $path (@INC)
	{
		local @ARGV = File::Spec->catfile( $path, $modfile );
		next unless -e $ARGV[0];

		$file = do { local $/; <> } or return;
	}

	return unless $file;

	$file =~ s/(while\s*\()/$1 Acme::Incorporated::breaks() && /g;
	$file =~ s[(for[^;]+{)(\s*)]
		      [$1$2last unless Acme::Incorporated::breaks();$2]xsg;



( run in 0.467 second using v1.01-cache-2.11-cpan-49f99fa48dc )