How to write tests in Perl. An exploration of CPAN test libraries.
Prove
- Test directory layout
- Test::More
- TAP
#!/usr/bin/env perl | |
package MyObject; | |
use Moo; | |
use Path::Tiny; | |
has file => (is => 'lazy', handles => [qw/slurp/]); | |
sub _build_file { path("./handles.pl") } |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use v5.19.6; | |
use Class::Load ':all'; | |
use Path::Tiny; | |
use PPI; | |
use List::AllUtils qw/first_index/; |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use v5.19.6; | |
use Class::Load ':all'; | |
use Path::Tiny; | |
use PPI; | |
use List::AllUtils qw/first_index/; |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use v5.10.1; | |
use Clone qw/clone/; | |
use DDP; | |
use List::AllUtils qw/first_index/; | |
use PPI; |
#!/usr/bin/env perl | |
# Inspired by @trisweb: | |
# http://github.com/holman/spark/wiki/Wicked-Cool-Usage | |
use strict; | |
use warnings; | |
use Getopt::Long::Descriptive; | |
use Encode qw/encode decode/; | |
use DateTime; |
ssh-dss AAAAB3NzaC1kc3MAAACBAKAkFkdwGP5EzpIq8FV//xIyY0SKTreYedyw82VeVIkxVh5H7NcyV6Qqea5cbm/jqC0/ycK2aWriRPJCCrNC/i8XerMd66dF5/vWYzJhvEHS7y5lIMgeg7qag4o1H60LPpaGxgqoOuR0AYwgf2UofQXwSncwPZzQ5N1TRO7+awHDAAAAFQD9pvu3jVbWcdw1lIJT/z8DN/AndQAAAIAwTrepDGQSwVpC0GVqNiEleOAl4WY6oBToFeavnS0k7zGQcmRE4WgL67G3sCxW1pgueD8OrcdMa6T7PRQnIIl9srU6t8c6ZuedfP92g1Fo6EiYGACBdbtSMqcY4qwqt6hsF0E6nYj7MG0XcTrmG3aikoSarVq2bR5rkZzSOLl+RAAAAIBy1V0pMClbIkc/ayRdgPfMid76IZaH64tyNt3HeQ16+f7lwCmfhfkeP/hZyJ3HPctpZ0AWAR+u9dk3xzsBBbwnoeHR3X2qZvuTZIGPLe9Jy6y72rFYKcMOw72IHa+ViHVM5Ccd9alvrOy2u+T5K6ms/rGTjzEyI/2wePIyye7/9A== |
use lib 'lib'; | |
use feature qw(say); | |
use Term::ANSIColor; | |
no warnings 'redefine'; | |
my @plugins = ( | |
'ReadLineHistory', # history saved across sessions | |
'Colors', # colorize return value and errors | |
'FancyPrompt', # provide an irb-like prompt |