]> iEval git - mafia.git/commitdiff
Don't depend on non-core modules
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 15 Aug 2015 17:17:16 +0000 (20:17 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 15 Aug 2015 17:17:16 +0000 (20:17 +0300)
Makefile.PL
t/examples.t

index fddb4e4769a448c367521e8dec0275584af0b677..2ff875dee79985cd317e1b86ebf13be235c42306 100644 (file)
@@ -9,13 +9,6 @@ WriteMakefile(
        MIN_PERL_VERSION  => '5.14.0',
        LICENSE           => 'perl',
        SIGN              => 1,
-       PREREQ_PM         => {
-               qw/Storable 0/,
-       },
-       BUILD_REQUIRES => {
-               qw/File::Basename 0
-                  File::Slurp 0/,
-       },
        META_MERGE         => {
                dynamic_config => 0,
                resources      => {
index 60f00fb2fba8ca15395a0610de813282f456107f..63efb10f15f68bacb391a183ffc11f0b1b1e0c69 100644 (file)
@@ -1,6 +1,8 @@
-#!/usr/bin/perl -w
-use File::Basename qw/fileparse/;
-use File::Slurp qw/read_file/;
+#!/usr/bin/perl
+use 5.014000;
+use warnings;
+
+use IO::Handle;
 use Mafia;
 
 my @examples;
@@ -13,7 +15,7 @@ for my $example (@examples) {
        open STDOUT, '>', \$out;
        clean;
 
-       my $ok = read_file "$example.out";
-       eval scalar read_file "$example.pl";
-       is $out, $ok, scalar fileparse $example
+       my $ok = join '', IO::File->new("$example.out", '<')->getlines;
+       do "$example.pl";
+       is $out, $ok, substr $example, length 't/examples/'
 }
This page took 0.018902 seconds and 4 git commands to generate.