App-CPANTS-Lint

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker::CPANfile" : "0.06"
         }
      },
      "runtime" : {
         "requires" : {
            "Carp" : "0",
            "Data::Dumper" : "0",
            "Getopt::Long" : "0",
            "Module::CPANTS::Analyse" : "0.96",
            "Pod::Usage" : "0",
            "perl" : "5.008001"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "repository" : {

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: App-CPANTS-Lint
no_index:
  directory:
    - t
    - inc
requires:
  Carp: '0'
  Data::Dumper: '0'
  Getopt::Long: '0'
  Module::CPANTS::Analyse: '0.96'
  Pod::Usage: '0'
  perl: '5.008001'
resources:
  repository: https://github.com/charsbar/App-CPANTS-Lint
version: '0.05'

README  view on Meta::CPAN

      use App::CPANTS::Lint;

      my $app = App::CPANTS::Lint->new(verbose => 1);
      $app->lint('path/to/Foo-Dist-1.42.tgz') or print $app->report;

      # if you need raw data
      $app->lint('path/to/Foo-Dist-1.42.tgz') or return $app->result;

      # if you need to look at the details of analysis
      $app->lint('path/to/Foo-Dist-1.42.tgz');
      print Data::Dumper::Dumper($app->stash);

DESCRIPTION
  App::CPANTS::Lint is a core of "cpants_lint.pl" script to check
  the Kwalitee of a distribution. See the script for casual usage.
  You can also use this from other modules for finer control.

METHODS
 new
  Takes an optional hash (which will be passed into
  Module::CPANTS::Analyse internally) and creates a linter object.

bin/cpants_lint.pl  view on Meta::CPAN

=head1 SYNOPSIS

    cpants_lint.pl path/to/Foo-Dist-1.42.tgz

    Options:
        --help              brief help message
        --man               full documentation
        --verbose           print more info during run
        --colour, --color   pretty output

        --dump              dump result using Data::Dumper
        --yaml              dump result as YAML
        --json              dump result as JSON

        --save              write report (or dump) to a file
        --dir               directory to save a report to
        --metrics_path      search path for extra metrics modules


=head1 DESCRIPTION

bin/cpants_lint.pl  view on Meta::CPAN

=head2 --verbose

Print some informative messages while analysing a distribution.

=head2 --colour, --color

Like C<< --verbose >>, but prettier. You need to install L<Term::ANSIColor> (and L<Win32::Console::ANSI> for Win32) to enable this option.

=head2 --dump

Dump the result using Data::Dumper (instead of displaying a report text).

=head2 --yaml

Dump the result as YAML.

=head2 --json

Dump the result as JSON.

=head3 --save

cpanfile  view on Meta::CPAN

requires 'Carp';
requires 'Data::Dumper';
requires 'Getopt::Long';
requires 'Module::CPANTS::Analyse' => '0.96';
requires 'Pod::Usage';

on 'test' => sub {
    requires 'Test::More' => '0.88'; # for done_testing
    requires 'Test::UseAllModules' => '0.10';
};

lib/App/CPANTS/Lint.pm  view on Meta::CPAN


sub _dump {
    my ($self, $thingy, $pretty) = @_;
    if ($self->{opts}{yaml} && eval { require CPAN::Meta::YAML }) {
        return CPAN::Meta::YAML::Dump($thingy);
    } elsif ($self->{opts}{json} && eval { require JSON::PP }) {
        my $coder = JSON::PP->new->utf8;
        $coder->pretty if $pretty;
        return $coder->encode($thingy);
    } else {
        require Data::Dumper;
        my $dumper = Data::Dumper->new([$thingy])->Terse(1)->Sortkeys(1);
        $dumper->Indent(0) unless $pretty;
        $dumper->Dump;
    }
}

sub stash  { shift->{mca}->d }
sub result { shift->{res} }

sub score {
    my ($self, $wants_detail) = @_;

lib/App/CPANTS/Lint.pm  view on Meta::CPAN

    use App::CPANTS::Lint;

    my $app = App::CPANTS::Lint->new(verbose => 1);
    $app->lint('path/to/Foo-Dist-1.42.tgz') or print $app->report;

    # if you need raw data
    $app->lint('path/to/Foo-Dist-1.42.tgz') or return $app->result;

    # if you need to look at the details of analysis
    $app->lint('path/to/Foo-Dist-1.42.tgz');
    print Data::Dumper::Dumper($app->stash);

=head1 DESCRIPTION

L<App::CPANTS::Lint> is a core of C<cpants_lint.pl> script to check the Kwalitee of a distribution. See the script for casual usage. You can also use this from other modules for finer control.

=head1 METHODS

=head2 new

Takes an optional hash (which will be passed into L<Module::CPANTS::Analyse> internally) and creates a linter object.



( run in 0.268 second using v1.01-cache-2.11-cpan-4d50c553e7e )