diff --git a/.appveyor.cmd b/.appveyor.cmd new file mode 100644 index 0000000..53bdaf7 --- /dev/null +++ b/.appveyor.cmd @@ -0,0 +1,67 @@ +@echo off +call :%* +goto :eof + +:perl_setup +if not defined perl_type set perl_type=system +if "%perl_type%" == "cygwin" ( + start /wait c:\cygwin\setup-x86.exe -q -g -P perl -P binutils -P make -P gcc -P gcc-core -P gcc-g++ -P make -P pkg-config -P libcrypt-devel -P openssl-devel -P autoconf -P automake -P m4 -P libtool -P curl + set "PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;%PATH%" +) else if "%perl_type%" == "strawberry" ( + if not defined perl_version ( + cinst -y StrawberryPerl + ) else ( + cinst -y StrawberryPerl --version %perl_version% + ) + if errorlevel 1 ( + type C:\ProgramData\chocolatey\logs\chocolatey.log + exit /b 1 + ) + set "PATH=C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;%PATH%" +) else if "%perl_type%" == "activestate" ( + start /wait ppm install dmake MinGW +) else ( + echo.Unknown perl type "%perl_type%"! 1>&2 + exit /b 1 +) +for /f "usebackq delims=" %%d in (`perl -MConfig -e"print $Config{make}"`) do set "make=%%d" +set "perl=perl" +set "cpanm=call .appveyor.cmd cpanm" +set "cpan=%perl% -S cpan" +set TAR_OPTIONS=--warning=no-unknown-keyword +goto :eof + +:cpanm +%perl% -S cpanm >NUL 2>&1 +if ERRORLEVEL 1 ( + curl -V >NUL 2>&1 + if ERRORLEVEL 1 cinst -y curl + curl -k -L https://cpanmin.us/ -o "%TEMP%\cpanm" + %perl% "%TEMP%\cpanm" -n App::cpanminus +) +set "cpanm=%perl% -S cpanm" +%cpanm% %* +goto :eof + +:local_lib +if "%perl_type%" == "cygwin" goto :local_lib_cygwin +%perl% -Ilib -Mlocal::lib=--shelltype=cmd %* > %TEMP%\local-lib.bat +call %TEMP%\local-lib.bat +del %TEMP%\local-lib.bat +goto :eof + +:local_lib_cygwin +for /f "usebackq delims=" %%d in (`sh -c "cygpath -w $HOME/perl5"`) do ( + c:\perl\bin\perl.exe -Ilib -Mlocal::lib - %%d --shelltype=cmd > "%TEMP%\local-lib.bat" +) +setlocal + call "%TEMP%\local-lib.bat" +endlocal & set "PATH=%PATH%" +set "PATH_BACK=%PATH%" +%perl% -Ilib -Mlocal::lib - --shelltype=cmd > "%TEMP%\local-lib.bat" +call "%TEMP%\local-lib.bat" +set "PATH=%PATH_BACK%" +del "%TEMP%\local-lib.bat" +goto :eof + +:eof diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..59de742 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,37 @@ +--- + +version: '{build}' +shallow_clone: true + +matrix: + fast_finish: true + +environment: + matrix: + - perl_type: strawberry + perl_version: 5.28.0.1 + - perl_type: strawberry + perl_version: 5.26.1.1 + - perl_type: strawberry + perl_version: 5.24.3.1 + - perl_type: strawberry + perl_version: 5.22.3.1 + - perl_type: strawberry + perl_version: 5.20.3.3 + - perl_type: strawberry + perl_version: 5.18.4.1 + - perl_type: strawberry + perl_version: 5.16.3.20170202 + - perl_type: strawberry + perl_version: 5.14.4.1 + +install: + - 'call .appveyor.cmd perl_setup' + - '%perl% -V' + - '%cpanm% -n IO::Socket::SSL LWP::Protocol::https HTTP::Tiny' + - '%cpanm% --installdeps -n .' + +build: off + +test_script: + - '%cpanm% --test-only -v .' diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8660ef8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,48 @@ +addons: + apt: + packages: + - aspell + - aspell-en +language: perl +perl: + - "blead" + - "blead-thr" + - "5.28" + - "5.28-thr" + - "5.26" + - "5.26-thr" + - "5.24" + - "5.24-thr" + - "5.22" + - "5.22-thr" + - "5.20" + - "5.20-thr" + - "5.18" + - "5.18-thr" + - "5.16" + - "5.16-thr" + - "5.14" + - "5.14-thr" + - "5.12" + - "5.12-thr" + - "5.10" + - "5.10-thr" + - "5.8" + - "5.8-thr" +env: + - "HARNESS_OPTIONS=j9" +before_install: + - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers + - source ~/travis-perl-helpers/init --always-upgrade-modules + - build-perl + - perl -V + - build-dist + - cd $BUILD_DIR +install: + - cpan-install --deps +script: + - perl Makefile.PL + - prove -lrb t/ xt/ +sudo: false +notifications: + email: false diff --git a/Changes b/Changes index 9aef07d..f1b7d7d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history File::Slurp +9999.20_01 2018-09-27 (TRIAL) - Fixed spelling mistakes in POD (RT #85251) - Fixed a typo in an example (RTs #72116, #80279) - Remove doc mentions of Perl < 5.006 as that's required. @@ -18,6 +19,7 @@ Revision history File::Slurp - Added more xt/author tests - Fix all trailing whitespace in accordance with xt/author/eol.t - Updated the Makefile.PL to get all of the prereqs in there. + - Add CI testing via TravisCI and AppVeyor 9999.19 Tue Jun 7 04:06:06 EDT 2011 - Fixed use line in t/edit_file.t to import :edit first diff --git a/MANIFEST b/MANIFEST index 29105e8..eaeaa50 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,7 @@ +.appveyor.cmd +.appveyor.yml .mailmap +.travis.yml Changes lib/File/Slurp.pm Makefile.PL diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 6aeb0e1..51fcbeb 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -6,3 +6,4 @@ TODO Makefile$ \.bak$ ^extras/ +pm_to_blib diff --git a/META.yml b/META.yml index 00ce481..deaee8a 100644 --- a/META.yml +++ b/META.yml @@ -3,7 +3,21 @@ abstract: 'Simple and Efficient Reading/Writing/Modifying of Complete Files' author: - 'Uri Guttman ' build_requires: + B: '0' + Carp: '0' + Exporter: '0' ExtUtils::MakeMaker: '0' + File::Spec: '0' + File::Temp: '0' + IO::Handle: '0' + POSIX: '0' + Scalar::Util: '0' + Socket: '0' + Symbol: '0' + Test::More: '0' + overload: '0' + strict: '0' + warnings: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 @@ -18,10 +32,13 @@ no_index: - t - inc requires: + B: '0' Carp: '0' + Errno: '0' Exporter: '0' Fcntl: '0' POSIX: '0' - perl: '5.004' + strict: '0' + warnings: '0' version: '9999.20' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/lib/File/Slurp.pm b/lib/File/Slurp.pm index 12d62d0..2c690bb 100644 --- a/lib/File/Slurp.pm +++ b/lib/File/Slurp.pm @@ -3,6 +3,9 @@ package File::Slurp; use strict; use warnings ; +our $VERSION = '9999.20_01'; +$VERSION = eval $VERSION; + use Carp ; use Exporter ; use Fcntl qw( :DEFAULT ) ; @@ -10,11 +13,9 @@ use POSIX qw( :fcntl_h ) ; use Errno ; #use Symbol ; -use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION ) ; +use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS ) ; @ISA = qw( Exporter ) ; -$VERSION = '9999.20'; - my @std_export = qw( read_file write_file