Devel-Cover

 view release on metacpan or  search on metacpan

bin/cover  view on Meta::CPAN


sub print_summary {
  my ($db) = @_;
  $db->print_summary($Options->{file}, $Options->{coverage}, { force => 1 })
    if $Options->{summary};
}

sub run_reports {
  my ($db, $argv) = @_;
  for my $report (@{ $Options->{report} }) {
    local @ARGV = @$argv;  # restore locally processed args for each report
    my $options = dclone($Options);
    my $format  = "Devel::Cover::Report::\u$report";
    $format->get_options($options) if $format->can("get_options");
    $format->report($db, $options);

    if ($options->{launch}) {
      if ($format->can("launch")) {
        $format->launch($options);
      } else {
        print STDERR "The launch option is not available for the ",

utils/makeh  view on Meta::CPAN

# The latest version of this software should be available from my homepage:
# https://pjcj.net

use strict;
use warnings;

my $Command = {
  strip_criterion => sub {
    my ($command, $criterion, $file) = @_;
    my $t;
    local ($^I, @ARGV) = (".bak", $file);
    while (<>) {
      $t = index($_, "$criterion   code") - 3 if !defined $t || $t < 0;
      substr $_, $t, 7, ""
        if /^line  err   stmt/ .. /^--------/
        and $t > -1
        and length > $t;
      print;
    }
  }
};

utils/prepare-commit-msg-hook  view on Meta::CPAN


sub main {
  my ($file, $type) = @ARGV;
  $type //= "";

  return 0 if $type !~ /^(?:|message|template|merge)$/;

  my $ticket = get_ticket();
  my ($seen_ticket, $seen_scissors);

  local ($^I, @ARGV) = ("", $file);
  while (my $line = <<>>) {
    chomp $line;

    if ($type eq "merge") {
      $line =~ s/^(Merge branch ')([A-Z]{2,8}-\d+).*/$1$2'/;
      say "" if $. == 2 && $line ne "";
    } else {
      if ($. == 1 && $line eq "") {
        say "\n\nTicket $ticket\n";
        $seen_ticket = 1;



( run in 2.502 seconds using v1.01-cache-2.11-cpan-302cb4679cc )