Acme-CPANModules-Assert

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


my %FallbackPrereqs = (
  "File::Spec" => 0,
  "IO::Handle" => 0,
  "IPC::Open3" => 0,
  "Test::More" => 0,
  "strict" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };

WriteMakefile(%WriteMakefileArgs);

README  view on Meta::CPAN

NAME
    Acme::CPANModules::Assert - List of modules to do assertion

VERSION
    This document describes version 0.002 of Acme::CPANModules::Assert (from
    Perl distribution Acme-CPANModules-Assert), released on 2022-03-08.

DESCRIPTION
    Assertion is a check statement that must evaluate to true or it will
    abort program's execution. It is useful during development/debugging:

     assert("there must be >3 arguments", sub { @args > 3 });

    In production code, compilers ideally do not generate code for assertion
    statements so they do not have any impact on runtime performance.

    In the old days, you only have this alternative to do it in Perl:

     assert(...) if DEBUG;

lib/Acme/CPANModules/Assert.pm  view on Meta::CPAN


our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2022-03-08'; # DATE
our $DIST = 'Acme-CPANModules-Assert'; # DIST
our $VERSION = '0.002'; # VERSION

our $LIST = {
    summary => 'List of modules to do assertion',
    description => <<'_',

Assertion is a check statement that must evaluate to true or it will abort
program's execution. It is useful during development/debugging:

    assert("there must be >3 arguments", sub { @args > 3 });

In production code, compilers ideally do not generate code for assertion
statements so they do not have any impact on runtime performance.

In the old days, you only have this alternative to do it in Perl:

    assert(...) if DEBUG;

lib/Acme/CPANModules/Assert.pm  view on Meta::CPAN

=head1 NAME

Acme::CPANModules::Assert - List of modules to do assertion

=head1 VERSION

This document describes version 0.002 of Acme::CPANModules::Assert (from Perl distribution Acme-CPANModules-Assert), released on 2022-03-08.

=head1 DESCRIPTION

Assertion is a check statement that must evaluate to true or it will abort
program's execution. It is useful during development/debugging:

 assert("there must be >3 arguments", sub { @args > 3 });

In production code, compilers ideally do not generate code for assertion
statements so they do not have any impact on runtime performance.

In the old days, you only have this alternative to do it in Perl:

 assert(...) if DEBUG;

t/00-compile.t  view on Meta::CPAN

            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
        and not eval { +require blib; blib->VERSION('1.01') };

    if (@_warnings)
    {
        warn @_warnings;
        push @warnings, @_warnings;
    }
}





( run in 2.522 seconds using v1.01-cache-2.11-cpan-98e64b0badf )