Skip to content

Instantly share code, notes, and snippets.

@ruz
Created August 21, 2011 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruz/1159863 to your computer and use it in GitHub Desktop.
Save ruz/1159863 to your computer and use it in GitHub Desktop.
Devel::Cover skipping nested anon subs
package Templates;
my $code = sub { 'foo' };
*simple = sub { return $code->(@_) };
1;
use Templates;
print Templates->simple, "\n";
rm -fr cover_db/
DEVEL_COVER_OPTIONS='+select,Templates' perl -I. -MDevel::Cover test.pl
cover
open cover_db/Templates-pm.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment