Code::Dumper - A debugging module to have your cake and eat it too


Code-Dumper documentation Contained in the Code-Dumper distribution.

Index


Code Index:

NAME

Top

Code::Dumper - A debugging module to have your cake and eat it too

SYNOPSIS

Top

  use Code::Dumper;

  # DUMP (

  print "just another perl hacker";

  # )

DESCRIPTION

Top

Surround code with the special Code::Dumper comments (see SYNOPSIS) and your code will be:

executed as normal

printed as well

Debugging can be fun. However after too many print statements and Data::Dumpers have been sprinked all around, lets face it... it can do your head in. Code::Dumper is a module that attempts to bring back debugging context and your sanity.

BUGS

Top

Please report them. Better yet, submit a patch :)

AUTHOR

Top

Alfie John, <alfiejohn@flamebait.org>

COPYRIGHT AND LICENSE

Top


Code-Dumper documentation Contained in the Code-Dumper distribution.

package Code::Dumper;

our $VERSION = '0.01';

use strict;
use warnings;

use Filter::Simple;

FILTER_ONLY
	'executable' => sub {
		s{
						\s* \# \s* DUMP \s* [(] \s*
						(.*?)
						\s* \# \s* [)] \s*
		 		 }
		 		 {
						print ' \n$1\n ';
						$1;
		 		 }gisx;
	};

1;

__END__