FunctionalPerl
view release on metacpan or search on metacpan
t/pod_snippets.t view on Meta::CPAN
#!/usr/bin/env perl
# Copyright (c) 2019-2020 Christian Jaeger, copying@christianjaeger.ch
# This is free software. See the file COPYING.md that came bundled
# with this file.
# Run example snippets in POD sections.
# If there's an issue with those, run `DEBUG=1 t/pod_snippets` and
# look at the saved file!
use strict;
use warnings;
use warnings FATAL => 'uninitialized';
use lib "./meta";
use FunctionalPerl::TailExpand;
use FunctionalPerl::ModuleList;
use FunctionalPerl::Dependencies 'module_needs';
use Chj::Backtrace;
use Chj::xperlfunc ":all";
use Test::Requires qw(Test::Pod::Snippets PadWalker FP::Repl::AutoTrap);
# ^ PadWalker only to give a more proper error message to the user; sigh.
use Test::More;
use FP::Repl::WithRepl qw(withrepl WithRepl_eval);
use FP::Carp;
sub myeval {
@_ == 1 or fp_croak_arity 1;
my ($str) = @_;
if (FP::Repl::AutoTrap::possibly_activate) {
withrepl {
&WithRepl_eval($str)
}
} else {
&WithRepl_eval($str)
}
}
require "./meta/find-perl.pl";
my %ignore = map { $_ => 1 } qw(
Chj::Class::Array
FP::DBI
FP::Trie
FP::Untainted
FP::IOStream
FP::Interfaces
FP::Repl::AutoTrap
Chj::Backtrace
Chj::BinHexOctDec
Chj::BuiltinTypePredicates
Chj::CPAN::ModulePODUrl
Chj::Class::methodnames
Chj::HTTP::Daemon
Chj::IO::Command
Chj::IO::CommandCommon
Chj::IO::Dir
Chj::IO::File
Chj::IO::Pipe
Chj::IO::PipelessCommand
Chj::IO::Tempfile
Chj::IO::WrappedFile
Chj::Linux::LmSensors
Chj::NamespaceClean
Chj::NamespaceCleanAbove
Chj::Package::OfPath
FP::Repl::Repl
FP::Repl::Dependencies
FP::Repl::Stack
FP::Repl::StackPlus
FP::Repl::corefuncs
Chj::Serialize
Chj::TerseDumper
FP::Repl::Trap
Chj::Unix::Exitcode
Chj::Unix::Signal
Chj::Util::AskYN
FP::Repl::WithRepl
Chj::chompspace
Chj::constructorexporter
Chj::pp
FP::Repl
( run in 3.307 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )