summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kennedy <adam@ali.as>2008-03-24 05:17:27 +0000
committerAdam Kennedy <adam@ali.as>2008-03-24 05:17:27 +0000
commit8e581653ede105782ee8fb8d9dd54665adbbdcd6 (patch)
tree10dbecb4c6cb101656db226da68f048d35c0d1f7
parent2f6363403b1732e64e716fbc430f7006730e5d49 (diff)
Adding 01_compile.t.
Making calls to CORE::open explicit
-rw-r--r--lib/File/Flat.pm4
-rw-r--r--t/01_compile.t13
-rw-r--r--t/02_api.t (renamed from t/01_api.t)0
-rw-r--r--t/03_main.t (renamed from t/02_main.t)0
4 files changed, 15 insertions, 2 deletions
diff --git a/lib/File/Flat.pm b/lib/File/Flat.pm
index 8d7021b..c1901d3 100644
--- a/lib/File/Flat.pm
+++ b/lib/File/Flat.pm
@@ -187,9 +187,9 @@ sub _slurp {
my $file = shift;
local $/ = undef;
local *SLURP;
- open( SLURP, "<$file" ) or return undef;
+ CORE::open( SLURP, "<$file" ) or return undef;
my $source = <SLURP>;
- close( SLURP ) or return undef;
+ CORE::close( SLURP ) or return undef;
\$source;
}
diff --git a/t/01_compile.t b/t/01_compile.t
new file mode 100644
index 0000000..f7827af
--- /dev/null
+++ b/t/01_compile.t
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+
+use Test::More tests => 2;
+
+ok( $] >= 5.005, 'Perl version is new enough' );
+
+use_ok( 'File::Flat' );
diff --git a/t/01_api.t b/t/02_api.t
index ef0e4d2..ef0e4d2 100644
--- a/t/01_api.t
+++ b/t/02_api.t
diff --git a/t/02_main.t b/t/03_main.t
index 2f24119..2f24119 100644
--- a/t/02_main.t
+++ b/t/03_main.t