Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add --list arg to bin/purge to list known keys
This probably isn't useful, but I thought it was once.
  • Loading branch information
rwstauner committed Jul 5, 2015
1 parent 6f830ce commit df50cb9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/purge.pl
Expand Up @@ -30,6 +30,7 @@ =head1 DESCRIPTION
'purge.pl %o',
[ 'all', "purge all", ],
[ 'key|k=s@', "key(s) to purge", ],
[ 'list|l', 'list available cache keys' ],
[], [ 'help', "print usage message and exit" ],
);

Expand All @@ -41,6 +42,12 @@ =head1 DESCRIPTION
$c->cdn_purge_all();

}
elsif( $opt->list ){
print
grep { !/_cache_key_for_user/ }
map { s/\A.+:\s+\$c->add_surrogate_key\((.+?)\);\Z/$1/; $_ }
qx{git grep add_surrogate_key lib/MetaCPAN/Web/Controller/}
}
else {

my $keys = $opt->key;
Expand Down

0 comments on commit df50cb9

Please sign in to comment.