NAME Data::Printer::Scoped - silence Data::Printer except in a controlled scope VERSION version 0.001000 SYNOPSIS Sometimes you want to stick a dumper statement on a very hot codepath, but you are interested in the output of your specific invocation. Often times this is in the middle of a test. To narrow down when and what gets dumped, you can just do this: use Data::Printer::Scoped qw/scope/; scope { do_something(); }; # elsewhere deep in another package sub some_hot_codepath { use Data::Printer; p $foo; } PROVIDED FUNCTIONS scope(&) Takes a single code block, and runs it. Before running, the overridden print method of Data::Printer will be enabled, and disabled afterward. AUTHOR Matthew Phillips COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Matthew Phillips . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.