App-Critique
view release on metacpan or search on metacpan
lib/App/Critique/Command/tutorial.pm view on Meta::CPAN
> critique init -v --perl-critic-policy Variables::ProhibitUnusedVariables
You will likely want to include the C<-v> (verbose) flag at a minimum,
but there is also a C<-d> (debug) flag which can be helpful.
=head2 Collect
Next you want to ask F<critique> to find all the files you want to
process. This will basically just traverse the directory tree and
find all the available perl files, and looks like this:
> critique collect -v --root lib/ExampleCompany/
You can also provide different criteria to help create the file list
that you want. You can do this in a few ways, here are some examples.
> critique collect -v --root lib/ --filter ExampleCompany/Db/
This would traverse the F<lib/> directory, but exclude any paths
which match the C<--filter> passed.
lib/App/Critique/Session.pm view on Meta::CPAN
## ...
sub _initialize_git_repo {
my ($class, %args) = @_;
my $git = Git::Wrapper->new( $args{git_work_tree} );
# auto-discover/validate the current git branch
my ($git_branch) = map /^\*\s(.*)$/, grep /^\*/, $git->branch;
Carp::confess('Unable to determine git branch, looks like your repository is bare')
unless $git_branch;
# make sure the branch we are on is the
# same one we are being asked to load,
# this error condition is very unlikely
# to occur since the session file path
# is based on branch, which is dynamically
# determined on load. The only way this
# could happen is if you manually loaded
# the session file for one branch while
( run in 0.442 second using v1.01-cache-2.11-cpan-64827b87656 )