Hello community,
here is the log from the commit of package perl-File-Slurp for openSUSE:Factory
checked in at 2020-07-06 16:18:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-File-Slurp (Old)
and /work/SRC/openSUSE:Factory/.perl-File-Slurp.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-File-Slurp"
Mon Jul 6 16:18:47 2020 rev:28 rq:818578 version:9999.32
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-File-Slurp/perl-File-Slurp.changes
2020-03-11 18:49:41.155523025 +0100
+++
/work/SRC/openSUSE:Factory/.perl-File-Slurp.new.3060/perl-File-Slurp.changes
2020-07-06 16:20:46.765592553 +0200
@@ -1,0 +2,15 @@
+Wed Jul 1 03:08:04 UTC 2020 - Tina Müller <[email protected]>
+
+- updated to 9999.32
+ see /usr/share/doc/packages/perl-File-Slurp/Changes
+
+ 9999.32 2020-06-30
+ - Re-release after fixing MANIFEST
+
+ 9999.31 2020-06-28
+ - Remove TravisCI and AppVeyor
+ - Test using GitHub Actions/workflows on Windows, Mac, and Linux
+ - Add See Also section to the docs. (PR#24 Thanks, Dan Book)
+ - Add file existence and size checks (RT 132900 - Thanks, Bao Haojun)
+
+-------------------------------------------------------------------
Old:
----
File-Slurp-9999.30.tar.gz
New:
----
File-Slurp-9999.32.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-File-Slurp.spec ++++++
--- /var/tmp/diff_new_pack.XfB5ay/_old 2020-07-06 16:21:00.125633700 +0200
+++ /var/tmp/diff_new_pack.XfB5ay/_new 2020-07-06 16:21:00.129633713 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-File-Slurp
#
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: perl-File-Slurp
-Version: 9999.30
+Version: 9999.32
Release: 0
%define cpan_name File-Slurp
Summary: Perl module for reading/writing/modifying complete files
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: https://metacpan.org/release/%{cpan_name}
+URL: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/C/CA/CAPOEIRAB/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
@@ -40,7 +40,6 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor
++++++ File-Slurp-9999.30.tar.gz -> File-Slurp-9999.32.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/.appveyor.cmd
new/File-Slurp-9999.32/.appveyor.cmd
--- old/File-Slurp-9999.30/.appveyor.cmd 2020-03-06 20:59:53.000000000
+0100
+++ new/File-Slurp-9999.32/.appveyor.cmd 1970-01-01 01:00:00.000000000
+0100
@@ -1,67 +0,0 @@
-@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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/.appveyor.yml
new/File-Slurp-9999.32/.appveyor.yml
--- old/File-Slurp-9999.30/.appveyor.yml 2020-03-06 20:59:53.000000000
+0100
+++ new/File-Slurp-9999.32/.appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,37 +0,0 @@
----
-
-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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/.travis.yml
new/File-Slurp-9999.32/.travis.yml
--- old/File-Slurp-9999.30/.travis.yml 2020-03-06 20:59:53.000000000 +0100
+++ new/File-Slurp-9999.32/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-sudo: false
-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:
- global:
- - TEST_PARTITIONS=4
- - AUTHOR_TESTING=1
- - AUTOMATED_TESTING=1
- - RELEASE_TESTING=1
-matrix:
- include:
- - perl: "5.20"
- env: COVERAGE=1 TEST_PARTITION=1
- - perl: "5.20"
- env: COVERAGE=1 TEST_PARTITION=2
- - perl: "5.20"
- env: COVERAGE=1 TEST_PARTITION=3
- - perl: "5.20"
- env: COVERAGE=1 TEST_PARTITION=4
-cache:
- directories:
- - $HOME/perl5
-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 Test::Spelling Test::Pod Test::Pod::Coverage
Test::Version Test::EOL
- - cpan-install --coverage
-before_script:
- - coverage-setup
-script:
- - perl Makefile.PL
- - make
- - prove -v -r -b -s -j$(test-jobs) $(test-files)
-after_success:
- - coverage-report
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/Changes
new/File-Slurp-9999.32/Changes
--- old/File-Slurp-9999.30/Changes 2020-03-09 15:24:19.000000000 +0100
+++ new/File-Slurp-9999.32/Changes 2020-07-01 02:21:04.000000000 +0200
@@ -1,268 +1,277 @@
-Revision history File::Slurp
-
-9999.30
- - Altered the atomic version of write_file to use temporary files that
- are also hidden files. (RT #132064)
-
-9999.29 2019-11-27
- - Correct some documentation errors where copy-paste had us saying
- File::Spec rather than File::Slurp. (RT 131097 - Thanks, Mike)
- - Reduce the size of the tests in t/handle.t to be nicer to CPAN
- Testers.
-
-9999.28 2019-04-05
- - Stop testing with Taint mode. Taint was a terrible practice that should
- have never ever ever been a thing.
-
-9999.27 2019-04-05
- - Update the documentation on the atomic write. We no longer use the pid
- and I neglected to update the documentation as such. (RT #129029)
- - Localize $^W to stop File::Temp from warning the user when the -w flag
- is on while we're grabbing a temporary file name. (RT #129029)
-
-9999.26 2019-02-13
- - Reduce the size of handle.t to prevent failures on systems with limits
set
- - Skip all tests in the suite that relied on overriding syswrite to test
- failure mechanisms as CORE::print cannot be overridden.
- - Refactor write_file to use print rather than syswrite.
- - When performing an atomic write, make sure we find a good temporary
file
- so that we don't accidentally overwrite a file that may already exist
in
- the working directory.
- - Stop re-working the line endings on write_file when on Windows as the
use
- of print now allows layers to provide that functionality.
- - Add File::Basename, File::Spec, File::Temp, and IO::Handle to the runtime
- prereqs. These were already testing prereqs and are core.
- - Perl 5.30 compliance is complete at this point.
-
-9999.25 2018-11-16
- - The previous release contained nothing but a documentation update. That
- updated documentation errantly mentioned pseudo-files. Pseudo-files
- are perfectly fine to use with File::Slurp.
- - Add regression test for GLOB refs being slurped in. Thank you, James
Keenan!
- https://github.com/perhunter/slurp/pull/17#issuecomment-437174592
- - Refactor read_file to use open and read rather than sysopen and sysread.
- - Add a bugwards compatible feature to keep track of the cursor when
- dealing with the DATA handle (https://github.com/perhunter/slurp/pull/17)
- - Fix a typo in the docs.
-
-9999.24 2018-10-29
- - Document the clear downfalls of using file handles of any kind rather
- than just the file's path string.
-
-9999.23 2018-10-20
- - Fix an error on the test rewrites with a bad value for binmode
- - Create a 00-report-prereqs.dd to ease testing on 5.6
- - Bump requirement for File::Spec to 3.01 as Cwd was shipped separately
- before and the one that came with 5.6 had Taint issues.
- - Cleaned up the Change log to make all dates uniform
-
-9999.22 2018-10-15
- - Update the SYNOPSIS documentation. (Graham Knop)
- - Fix some EUMM metadata depending on version. (Dan Book)
- - Fix Windows path concatenation on read_dir. (James Keenan)
- - Document each function with proper POD heads and re-order in alphabetical
- - Dump the POD to GH markdown for a README.md
- - Remove the README file
- - Remove some work-arounds for older Perls < 5.6
- - Do not inherit from Exporter (requires Exporter 5.57)
- - Fix perms.t to run on all platforms (Aristotle Pagaltzis, Linda Walsh
- via RT #92401)
- - Clean up handle.t (we no longer use the -w flag anywhere)
-
-9999.21 2018-10-08
- - Unset $^W in a few strategic places to silence warnings when
Test::Harness
- or ExtUtils::MakeMaker turn them on. (Thanks, Graham Knop).
- - Got rid of a few MYMETA leftovers in the MANIFEST
- - Add Git repository info to the Makefile
- - Add a contributor's list for display on metacpan
-
-9999.20_02 2018-10-04 (TRIAL)
- - Update TravisCI tests to show coverage.
- - Update all remaining test files
- - Get rid of assumption of . in @INC in tests
- - Remove t/TestDriver.pm
- - Add t/lib/FileSlurpTest.pm
- - Make sure all tests use a properly acquired temp file
- - Clean up prereqs a bit further
- - Document all failure cases in the 01-error* tests.
- - Moved the CORE:: function overrides to their own test class to only be
- included when overriding is necessary
-
-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.
- - Fix POD coverage tests by adding a few more ignored functions
- - Added t/edit_file.t (James Keenan)
- - Move the POD tests to xt/author
- - Update t/append_null.t
- - Update t/binmode.t
- - Update t/data_list.t
- - Update t/data_scalar.t
- - Update t/error_mode.t
- - Update t/large.t
- - Update t/original.t
- - Update t/stringify.t
- - Added t/00-report-prereqs.t
- - 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 2011-Jun-7
- - Fixed use line in t/edit_file.t to import :edit first (paul)
- - read_file and write_file work even when interrupted by signals
- this includes a test for read_file interrupt (Andrew Danforth)
- - Fixed bugs in the config synopsis example
-
-9999.18 2011-May-13
- - Added :std and :edit export tags
- - Cleaned up EXPORT vars
- - Documented importing edit_file and edit_file_lines
- - Fixed some pod spelling
-
-9999.17 2011-04-27
- - Requiring Perl 5.6.2 (first time older Perls were dropped)
- This is because of use of the re 'taint' pragma
- - Added major new features: edit_file and edit_file_lines
- - Speed up of tainted slurp with return of lines
- - Added chomp option to read_file
- - Added prefix option to read_dir
- - Fixed optimization of reading small files.
-
-9999.16 2011-04-13
- - Added support for read_file options to be a hash reference.
- - Added support for read_dir options to be a hash reference.
- - Added new feature prepend_file
- - Fixed bug with array_ref in list context. was introduced by .15/.14
- Thanks to Norbert Gruener
- - Cleaned up some pod
-
-9999.15 2011-03-24
- - Fixed error.t test so it works when run as root
- - Removed skip lines from error.t
- - Fixed pod about binmode option to reflect changes in .14
-
-9999.14 2011-03-20
- - Added LICENCE (same as perl) to POD
- - Added special faster code to slurp in small text files which
- is a common case
- - Rewrote the extras/slurp_bench.pl script. It has a full
- legend, better CLI options, size is selectable, benchmark
- entries have more consistant names and it compares the new
- fast slurp for small files to the general slurp code.
- Thanks to Mark Friendlich
- - Cleaned up pod
- - Added more Synopsis examples
- - Added t/error.t to actually test error conditions. Previous
- error.t was renamed to error_mode.t which better reflects its
- tests.
- - t/error.t uses a new test driver module. this may get used by
- other tests in the future.
- - Fixed check for SEEK_SET and other constant subs being defined
- - Added support for binmode other than :raw and binmode.t test
- Thanks to Martin J. Evans, Peter Edwards, Bryce Nesbitt
- - Added support for perms option in write_file and perms.t test
- Thanks to Peter Corlett and Paul Miller
- - Added check to the rename call in atomic mode. Tested in error.t.
- Thanks to Daniel Scott Sterling
- - Added POD to state that using scalar_ref or buf_ref will be faster
- and save memory due to not making a copy (Peter Edwards)
- - read_file in list mode keeps data tainted (Sébastien Aperghis-Tramoni)
- - read_file checks for an overloaded object to get the file
- name. (Sébastien Aperghis-Tramoni)
-
-9999.13 2006-10-10
- - Refactored the extras/slurp_bench.pl script. It has options,
- a key the benchmarks, help and more benchmarks.
- - Reordered changes so recent entries are first
- - Added error check on atomic rename and test for it. Thanks to Daniel
- Scott Sterling
-
-9999.12 2006-02-2
- - Fixed bug on windows with classic slurping and File::Slurp not
- agreeing on newline conversion.
- - Added t/newline.t test to check for that fix.
- - When passing text data by scalar reference to write_file under
- windows, the buffer is copied so the newline conversion won't
- modify the caller's data.
- - Thanks to Johan Lodin <[email protected]> for a test script which
- I modified into t/newline.t
-
-9999.11 2005-01-20
- - Quick release to remove code that forced the faked SEEK_*
- values to be used. Showed up when tested on OSX which doesn't
- need that backport.
-
-9999.10 2005-01-19
- - t/*.t modules don't use Fcntl.pm
- - using POSIX qw( :fcntl_h ) instead of Fcntl qw( :seek ) for
- backwards compatiblity to 5.00503
- - added conditional definitions of SEEK_* and O_* subs as they are not
- defined in perl 5.004
- - File::Slurp now runs on perl 5.004 and newer (see BUGS section)
- All of the above thanks to Smylers <[email protected]>,
- Piers Kent <[email protected]> and
- John Alden <[email protected]>
- - Added pod.t and pod_coverage.t tests. This is to pass all
- the CPANTS tests.
-
-9999.09 2005-04-19
- - t/original.t and read_dir.t no longer search for tempdirs. they just
- use the current dir which should be in the build directory
- - t/readdir.t renamed to read_dir.t for consistancy
- - write_file return values are docuemented
- Thanks to Adam Kennedy <[email protected]>
- - added no_clobber option to write_file and t/no_clobber.t test for it
- Thanks to <[email protected]>
- - fixed bug when appending a null string to a file which then
- truncates it. seems to be an odd way for linux and OS X to
- handle O_APPEND mode on sysopen. they don't seek to the end of
- the file so it gets truncated. fixed by adding a seek to the
- end if in append mode.n
- Thanks to Chris Dolan <[email protected]>
-
-9999.08 2005-04-16
- - read_dir returns an array ref in scalar context
- - read_dir keeps . and .. if keep_dot_dot option is set.
- Thanks to John Alden <[email protected]>
- - slurp() is an optional exported alias to read_file
- Thanks to Damian Conway <[email protected]>
-
-9999.07 2005-01-25
- - Slurping in pseudo files (as in /proc) which show a size of 0
- but actually have data works. This seems to be the case on
- linux but on Solaris those files show their proper size.
- Thanks to Juerd Waalboer <[email protected]>
-
-9999.06 2004-09-20
- - Slurping the DATA handle now works without the workaround.
- tests are in t/data_scalar.t and t/data_list.t
- - Paragraph mode in read_file is supported. As with <> when $/
- (input record separator) is set to '', then the input file is
- split on multiple newlines (/\n\n+/).
- Thanks to Geoffrey Leach <[email protected]>
-
-9999.05 2004-02-24
- - skip handle tests where socketpair is not supported (pre 5.8
- on windows) Thanks to Mike Arms <[email protected]>
-
-9999.04 2004-02-23
- - fixed DATA handle bug in t/handle.t (not seen on most OS's) Thanks to
- James Willmore <[email protected]>
-
-9999.03 2003-12-22
- - fixed DATA handle bugs in t/handle.t on osx (should be fixed
- on BSD as well)
- - added more comments to code
-
-9999.02 2003-12-17
- - skip DATA test in handle.t on OSX (bug in perl with sysread on DATA)
- - changed checking if file handle from fileno to ref
- from Randal Schwartz <[email protected]>
- - added support for atomic spewing
- - added new test stdin.t for the fileno/ref change
- - added new test inode.t to test atomic spewing
-
-9999.01 2003-09-01
- - original version; created by h2xs 1.21 with options -AX -n
File::FastSlurp
+Revision history File::Slurp
+
+9999.32 2020-06-30
+ - Re-release after fixing MANIFEST
+
+9999.31 2020-06-28
+ - Remove TravisCI and AppVeyor
+ - Test using GitHub Actions/workflows on Windows, Mac, and Linux
+ - Add See Also section to the docs. (PR#24 Thanks, Dan Book)
+ - Add file existence and size checks (RT 132900 - Thanks, Bao Haojun)
+
+9999.30 2020-03-09
+ - Altered the atomic version of write_file to use temporary files that
+ are also hidden files. (RT #132064)
+
+9999.29 2019-11-27
+ - Correct some documentation errors where copy-paste had us saying
+ File::Spec rather than File::Slurp. (RT 131097 - Thanks, Mike)
+ - Reduce the size of the tests in t/handle.t to be nicer to CPAN
+ Testers.
+
+9999.28 2019-04-05
+ - Stop testing with Taint mode. Taint was a terrible practice that should
+ have never ever ever been a thing.
+
+9999.27 2019-04-05
+ - Update the documentation on the atomic write. We no longer use the pid
+ and I neglected to update the documentation as such. (RT #129029)
+ - Localize $^W to stop File::Temp from warning the user when the -w flag
+ is on while we're grabbing a temporary file name. (RT #129029)
+
+9999.26 2019-02-13
+ - Reduce the size of handle.t to prevent failures on systems with limits
set
+ - Skip all tests in the suite that relied on overriding syswrite to test
+ failure mechanisms as CORE::print cannot be overridden.
+ - Refactor write_file to use print rather than syswrite.
+ - When performing an atomic write, make sure we find a good temporary
file
+ so that we don't accidentally overwrite a file that may already exist
in
+ the working directory.
+ - Stop re-working the line endings on write_file when on Windows as the
use
+ of print now allows layers to provide that functionality.
+ - Add File::Basename, File::Spec, File::Temp, and IO::Handle to the runtime
+ prereqs. These were already testing prereqs and are core.
+ - Perl 5.30 compliance is complete at this point.
+
+9999.25 2018-11-16
+ - The previous release contained nothing but a documentation update. That
+ updated documentation errantly mentioned pseudo-files. Pseudo-files
+ are perfectly fine to use with File::Slurp.
+ - Add regression test for GLOB refs being slurped in. Thank you, James
Keenan!
+ https://github.com/perhunter/slurp/pull/17#issuecomment-437174592
+ - Refactor read_file to use open and read rather than sysopen and sysread.
+ - Add a bugwards compatible feature to keep track of the cursor when
+ dealing with the DATA handle (https://github.com/perhunter/slurp/pull/17)
+ - Fix a typo in the docs.
+
+9999.24 2018-10-29
+ - Document the clear downfalls of using file handles of any kind rather
+ than just the file's path string.
+
+9999.23 2018-10-20
+ - Fix an error on the test rewrites with a bad value for binmode
+ - Create a 00-report-prereqs.dd to ease testing on 5.6
+ - Bump requirement for File::Spec to 3.01 as Cwd was shipped separately
+ before and the one that came with 5.6 had Taint issues.
+ - Cleaned up the Change log to make all dates uniform
+
+9999.22 2018-10-15
+ - Update the SYNOPSIS documentation. (Graham Knop)
+ - Fix some EUMM metadata depending on version. (Dan Book)
+ - Fix Windows path concatenation on read_dir. (James Keenan)
+ - Document each function with proper POD heads and re-order in alphabetical
+ - Dump the POD to GH markdown for a README.md
+ - Remove the README file
+ - Remove some work-arounds for older Perls < 5.6
+ - Do not inherit from Exporter (requires Exporter 5.57)
+ - Fix perms.t to run on all platforms (Aristotle Pagaltzis, Linda Walsh
+ via RT #92401)
+ - Clean up handle.t (we no longer use the -w flag anywhere)
+
+9999.21 2018-10-08
+ - Unset $^W in a few strategic places to silence warnings when
Test::Harness
+ or ExtUtils::MakeMaker turn them on. (Thanks, Graham Knop).
+ - Got rid of a few MYMETA leftovers in the MANIFEST
+ - Add Git repository info to the Makefile
+ - Add a contributor's list for display on metacpan
+
+9999.20_02 2018-10-04 (TRIAL)
+ - Update TravisCI tests to show coverage.
+ - Update all remaining test files
+ - Get rid of assumption of . in @INC in tests
+ - Remove t/TestDriver.pm
+ - Add t/lib/FileSlurpTest.pm
+ - Make sure all tests use a properly acquired temp file
+ - Clean up prereqs a bit further
+ - Document all failure cases in the 01-error* tests.
+ - Moved the CORE:: function overrides to their own test class to only be
+ included when overriding is necessary
+
+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.
+ - Fix POD coverage tests by adding a few more ignored functions
+ - Added t/edit_file.t (James Keenan)
+ - Move the POD tests to xt/author
+ - Update t/append_null.t
+ - Update t/binmode.t
+ - Update t/data_list.t
+ - Update t/data_scalar.t
+ - Update t/error_mode.t
+ - Update t/large.t
+ - Update t/original.t
+ - Update t/stringify.t
+ - Added t/00-report-prereqs.t
+ - 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 2011-Jun-7
+ - Fixed use line in t/edit_file.t to import :edit first (paul)
+ - read_file and write_file work even when interrupted by signals
+ this includes a test for read_file interrupt (Andrew Danforth)
+ - Fixed bugs in the config synopsis example
+
+9999.18 2011-May-13
+ - Added :std and :edit export tags
+ - Cleaned up EXPORT vars
+ - Documented importing edit_file and edit_file_lines
+ - Fixed some pod spelling
+
+9999.17 2011-04-27
+ - Requiring Perl 5.6.2 (first time older Perls were dropped)
+ This is because of use of the re 'taint' pragma
+ - Added major new features: edit_file and edit_file_lines
+ - Speed up of tainted slurp with return of lines
+ - Added chomp option to read_file
+ - Added prefix option to read_dir
+ - Fixed optimization of reading small files.
+
+9999.16 2011-04-13
+ - Added support for read_file options to be a hash reference.
+ - Added support for read_dir options to be a hash reference.
+ - Added new feature prepend_file
+ - Fixed bug with array_ref in list context. was introduced by .15/.14
+ Thanks to Norbert Gruener
+ - Cleaned up some pod
+
+9999.15 2011-03-24
+ - Fixed error.t test so it works when run as root
+ - Removed skip lines from error.t
+ - Fixed pod about binmode option to reflect changes in .14
+
+9999.14 2011-03-20
+ - Added LICENCE (same as perl) to POD
+ - Added special faster code to slurp in small text files which
+ is a common case
+ - Rewrote the extras/slurp_bench.pl script. It has a full
+ legend, better CLI options, size is selectable, benchmark
+ entries have more consistant names and it compares the new
+ fast slurp for small files to the general slurp code.
+ Thanks to Mark Friendlich
+ - Cleaned up pod
+ - Added more Synopsis examples
+ - Added t/error.t to actually test error conditions. Previous
+ error.t was renamed to error_mode.t which better reflects its
+ tests.
+ - t/error.t uses a new test driver module. this may get used by
+ other tests in the future.
+ - Fixed check for SEEK_SET and other constant subs being defined
+ - Added support for binmode other than :raw and binmode.t test
+ Thanks to Martin J. Evans, Peter Edwards, Bryce Nesbitt
+ - Added support for perms option in write_file and perms.t test
+ Thanks to Peter Corlett and Paul Miller
+ - Added check to the rename call in atomic mode. Tested in error.t.
+ Thanks to Daniel Scott Sterling
+ - Added POD to state that using scalar_ref or buf_ref will be faster
+ and save memory due to not making a copy (Peter Edwards)
+ - read_file in list mode keeps data tainted (Sébastien Aperghis-Tramoni)
+ - read_file checks for an overloaded object to get the file
+ name. (Sébastien Aperghis-Tramoni)
+
+9999.13 2006-10-10
+ - Refactored the extras/slurp_bench.pl script. It has options,
+ a key the benchmarks, help and more benchmarks.
+ - Reordered changes so recent entries are first
+ - Added error check on atomic rename and test for it. Thanks to Daniel
+ Scott Sterling
+
+9999.12 2006-02-2
+ - Fixed bug on windows with classic slurping and File::Slurp not
+ agreeing on newline conversion.
+ - Added t/newline.t test to check for that fix.
+ - When passing text data by scalar reference to write_file under
+ windows, the buffer is copied so the newline conversion won't
+ modify the caller's data.
+ - Thanks to Johan Lodin <[email protected]> for a test script which
+ I modified into t/newline.t
+
+9999.11 2005-01-20
+ - Quick release to remove code that forced the faked SEEK_*
+ values to be used. Showed up when tested on OSX which doesn't
+ need that backport.
+
+9999.10 2005-01-19
+ - t/*.t modules don't use Fcntl.pm
+ - using POSIX qw( :fcntl_h ) instead of Fcntl qw( :seek ) for
+ backwards compatiblity to 5.00503
+ - added conditional definitions of SEEK_* and O_* subs as they are not
+ defined in perl 5.004
+ - File::Slurp now runs on perl 5.004 and newer (see BUGS section)
+ All of the above thanks to Smylers <[email protected]>,
+ Piers Kent <[email protected]> and
+ John Alden <[email protected]>
+ - Added pod.t and pod_coverage.t tests. This is to pass all
+ the CPANTS tests.
+
+9999.09 2005-04-19
+ - t/original.t and read_dir.t no longer search for tempdirs. they just
+ use the current dir which should be in the build directory
+ - t/readdir.t renamed to read_dir.t for consistancy
+ - write_file return values are docuemented
+ Thanks to Adam Kennedy <[email protected]>
+ - added no_clobber option to write_file and t/no_clobber.t test for it
+ Thanks to <[email protected]>
+ - fixed bug when appending a null string to a file which then
+ truncates it. seems to be an odd way for linux and OS X to
+ handle O_APPEND mode on sysopen. they don't seek to the end of
+ the file so it gets truncated. fixed by adding a seek to the
+ end if in append mode.n
+ Thanks to Chris Dolan <[email protected]>
+
+9999.08 2005-04-16
+ - read_dir returns an array ref in scalar context
+ - read_dir keeps . and .. if keep_dot_dot option is set.
+ Thanks to John Alden <[email protected]>
+ - slurp() is an optional exported alias to read_file
+ Thanks to Damian Conway <[email protected]>
+
+9999.07 2005-01-25
+ - Slurping in pseudo files (as in /proc) which show a size of 0
+ but actually have data works. This seems to be the case on
+ linux but on Solaris those files show their proper size.
+ Thanks to Juerd Waalboer <[email protected]>
+
+9999.06 2004-09-20
+ - Slurping the DATA handle now works without the workaround.
+ tests are in t/data_scalar.t and t/data_list.t
+ - Paragraph mode in read_file is supported. As with <> when $/
+ (input record separator) is set to '', then the input file is
+ split on multiple newlines (/\n\n+/).
+ Thanks to Geoffrey Leach <[email protected]>
+
+9999.05 2004-02-24
+ - skip handle tests where socketpair is not supported (pre 5.8
+ on windows) Thanks to Mike Arms <[email protected]>
+
+9999.04 2004-02-23
+ - fixed DATA handle bug in t/handle.t (not seen on most OS's) Thanks to
+ James Willmore <[email protected]>
+
+9999.03 2003-12-22
+ - fixed DATA handle bugs in t/handle.t on osx (should be fixed
+ on BSD as well)
+ - added more comments to code
+
+9999.02 2003-12-17
+ - skip DATA test in handle.t on OSX (bug in perl with sysread on DATA)
+ - changed checking if file handle from fileno to ref
+ from Randal Schwartz <[email protected]>
+ - added support for atomic spewing
+ - added new test stdin.t for the fileno/ref change
+ - added new test inode.t to test atomic spewing
+
+9999.01 2003-09-01
+ - original version; created by h2xs 1.21 with options -AX -n
File::FastSlurp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/MANIFEST
new/File-Slurp-9999.32/MANIFEST
--- old/File-Slurp-9999.30/MANIFEST 2020-03-09 15:27:40.000000000 +0100
+++ new/File-Slurp-9999.32/MANIFEST 2020-07-01 02:29:48.000000000 +0200
@@ -1,7 +1,4 @@
-.appveyor.cmd
-.appveyor.yml
.mailmap
-.travis.yml
Changes
lib/File/Slurp.pm
Makefile.PL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/META.json
new/File-Slurp-9999.32/META.json
--- old/File-Slurp-9999.30/META.json 2020-03-09 15:27:40.000000000 +0100
+++ new/File-Slurp-9999.32/META.json 2020-07-01 02:29:48.000000000 +0200
@@ -4,7 +4,7 @@
"Uri Guttman <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter
version 2.150010",
+ "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter
version 2.150010",
"license" : [
"perl_5"
],
@@ -75,7 +75,7 @@
"web" : "https://github.com/perhunter/slurp"
}
},
- "version" : "9999.30",
+ "version" : "9999.32",
"x_contributors" : [
"Aristotle Pagaltzis <[email protected]>",
"Chase Whitener <[email protected]>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/META.yml
new/File-Slurp-9999.32/META.yml
--- old/File-Slurp-9999.30/META.yml 2020-03-09 15:27:39.000000000 +0100
+++ new/File-Slurp-9999.32/META.yml 2020-07-01 02:29:47.000000000 +0200
@@ -22,7 +22,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.38, CPAN::Meta::Converter version
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version
2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -48,7 +48,7 @@
warnings: '0'
resources:
repository: https://github.com/perhunter/slurp.git
-version: '9999.30'
+version: '9999.32'
x_contributors:
- 'Aristotle Pagaltzis <[email protected]>'
- 'Chase Whitener <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/README.md
new/File-Slurp-9999.32/README.md
--- old/File-Slurp-9999.30/README.md 2020-03-06 20:59:53.000000000 +0100
+++ new/File-Slurp-9999.32/README.md 2020-06-29 00:24:53.000000000 +0200
@@ -58,23 +58,23 @@
In other words, if you don't have a filename to pass, consider using the
standard `do { local $/; <$fh> }`, or
-[Data::Section](https://metacpan.org/pod/Data::Section)/[Data::Section::Simple](https://metacpan.org/pod/Data::Section::Simple)
for working with `__DATA__`.
+[Data::Section](https://metacpan.org/pod/Data%3A%3ASection)/[Data::Section::Simple](https://metacpan.org/pod/Data%3A%3ASection%3A%3ASimple)
for working with `__DATA__`.
# FUNCTIONS
-[File::Slurp](https://metacpan.org/pod/File::Slurp) implements the following
functions.
+[File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp) implements the
following functions.
## append\_file
```perl
- use File::Spec qw(append_file write_file);
+ use File::Slurp qw(append_file write_file);
my $res = append_file('/path/file', "Some text");
# same as
my $res = write_file('/path/file', {append => 1}, "Some text");
```
The `append_file` function is simply a synonym for the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function, but
ensures that the `append` option is
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function, but
ensures that the `append` option is
set.
## edit\_file
@@ -102,9 +102,9 @@
The next argument(s) is either a hash reference or a flattened hash,
`key => value` pairs. The options are passed through to the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function. All
options are described there.
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function. All
options are described there.
Only the `binmode` and `err_mode` options are supported. The call to
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) has the `atomic`
option set so you will always
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) has the
`atomic` option set so you will always
have a consistent file.
## edit\_file\_lines
@@ -131,9 +131,9 @@
The next argument(s) is either a hash reference or a flattened hash,
`key => value` pairs. The options are passed through to the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function. All
options are described there.
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function. All
options are described there.
Only the `binmode` and `err_mode` options are supported. The call to
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) has the `atomic`
option set so you will always
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) has the
`atomic` option set so you will always
have a consistent file.
## ef
@@ -147,7 +147,7 @@
ef \&replace_foo, '/path/file';
```
-The `ef` function is simply a synonym for the ["edit\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#edit_file)
+The `ef` function is simply a synonym for the ["edit\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#edit_file)
function.
## efl
@@ -161,18 +161,18 @@
efl \&delete_foo, '/path/file';
```
-The `efl` function is simply a synonym for the ["edit\_file\_lines" in
File::Slurp](https://metacpan.org/pod/File::Slurp#edit_file_lines)
+The `efl` function is simply a synonym for the ["edit\_file\_lines" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#edit_file_lines)
function.
## overwrite\_file
```perl
- use File::Spec qw(overwrite_file);
+ use File::Slurp qw(overwrite_file);
my $res = overwrite_file('/path/file', "Some text");
```
The `overwrite_file` function is simply a synonym for the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function.
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function.
## prepend\_file
@@ -189,9 +189,9 @@
write_file('/path/file', $new_content . $content);
```
-The `prepend_file` function is the opposite of ["append\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#append_file) as
+The `prepend_file` function is the opposite of ["append\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#append_file) as
it writes new contents to the beginning of the file instead of the end. It is a
-combination of ["read\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#read_file) and ["write\_file"
in File::Slurp](https://metacpan.org/pod/File::Slurp#write_file). It
+combination of ["read\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#read_file) and
["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file). It
works by first using `read_file` to slurp in the file and then calling
`write_file` with the new data and the existing file data.
@@ -199,7 +199,7 @@
The next argument(s) is either a hash reference or a flattened hash,
`key => value` pairs. The options are passed through to the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function. All
options are described there.
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function. All
options are described there.
Only the `binmode` and `err_mode` options are supported. The
`write_file` call has the `atomic` option set so you will always have
@@ -208,7 +208,7 @@
## read\_dir
```perl
- use File::Spec qw(read_dir);
+ use File::Slurp qw(read_dir);
my @files = read_dir('/path/to/dir');
# all files, even the dots
my @files = read_dir('/path/to/dir', keep_dot_dot => 1);
@@ -232,8 +232,8 @@
The `err_mode` option has three possible values: `quiet`, `carp`, or the
default, `croak`. In `quiet` mode, all errors will be silent. In `carp`
mode,
all errors will be emitted as warnings. And, in `croak` mode, all errors
will
- be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try::Tiny) or
- [Syntax::Keyword::Try](https://metacpan.org/pod/Syntax::Keyword::Try) to
see how to catch exceptions.
+ be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try%3A%3ATiny) or
+
[Syntax::Keyword::Try](https://metacpan.org/pod/Syntax%3A%3AKeyword%3A%3ATry)
to see how to catch exceptions.
- keep\_dot\_dot
@@ -246,7 +246,7 @@
The `prefix` option is a boolean option, defaulted to false (`0`).
Setting this option to true (`1`) add the directory as a prefix to the
file.
The directory and the filename are joined using `File::Spec->catfile()` to
- ensure the proper directory separator is used for your OS. See
[File::Spec](https://metacpan.org/pod/File::Spec).
+ ensure the proper directory separator is used for your OS. See
[File::Spec](https://metacpan.org/pod/File%3A%3ASpec).
## read\_file
@@ -319,8 +319,8 @@
The `err_mode` option has three possible values: `quiet`, `carp`, or the
default, `croak`. In `quiet` mode, all errors will be silent. In `carp`
mode,
all errors will be emitted as warnings. And, in `croak` mode, all errors
will
- be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try::Tiny) or
- [Syntax::Keyword::Try](https://metacpan.org/pod/Syntax::Keyword::Try) to
see how to catch exceptions.
+ be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try%3A%3ATiny) or
+
[Syntax::Keyword::Try](https://metacpan.org/pod/Syntax%3A%3AKeyword%3A%3ATry)
to see how to catch exceptions.
- scalar\_ref
@@ -333,32 +333,32 @@
## rf
```perl
- use File::Spec qw(rf);
+ use File::Slurp qw(rf);
my $text = rf('/path/file');
```
-The `rf` function is simply a synonym for the ["read\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#read_file)
+The `rf` function is simply a synonym for the ["read\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#read_file)
function.
## slurp
```perl
- use File::Spec qw(slurp);
+ use File::Slurp qw(slurp);
my $text = slurp('/path/file');
```
-The `slurp` function is simply a synonym for the ["read\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#read_file)
+The `slurp` function is simply a synonym for the ["read\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#read_file)
function.
## wf
```perl
- use File::Spec qw(wf);
+ use File::Slurp qw(wf);
my $res = wf('/path/file', "Some text");
```
The `wf` function is simply a synonym for the
-["write\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#write_file) function.
+["write\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#write_file) function.
## write\_file
@@ -403,13 +403,13 @@
this option to true (`1`) will cause the data to be be written at the end
of
the current file. Internally this sets the `sysopen` mode flag `O_APPEND`.
- The ["append\_file" in
File::Slurp](https://metacpan.org/pod/File::Slurp#append_file) function sets
this option by default.
+ The ["append\_file" in
File::Slurp](https://metacpan.org/pod/File%3A%3ASlurp#append_file) function
sets this option by default.
- atomic
The `atomic` option is a boolean option, defaulted to false (`0`). Setting
this option to true (`1`) will cause the file to be be written to in an
- atomic fashion. A temporary file name is created using ["tempfile" in
File::Temp](https://metacpan.org/pod/File::Temp#tempfile).
+ atomic fashion. A temporary file name is created using ["tempfile" in
File::Temp](https://metacpan.org/pod/File%3A%3ATemp#tempfile).
After the file is closed it is renamed to the original file name
(and `rename` is an atomic operation on most OSes). If the program using
this were to crash in the middle of this, then the temporary file could
@@ -433,8 +433,8 @@
The `err_mode` option has three possible values: `quiet`, `carp`, or the
default, `croak`. In `quiet` mode, all errors will be silent. In `carp`
mode,
all errors will be emitted as warnings. And, in `croak` mode, all errors
will
- be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try::Tiny) or
- [Syntax::Keyword::Try](https://metacpan.org/pod/Syntax::Keyword::Try) to
see how to catch exceptions.
+ be emitted as exceptions. Take a look at
[Try::Tiny](https://metacpan.org/pod/Try%3A%3ATiny) or
+
[Syntax::Keyword::Try](https://metacpan.org/pod/Syntax%3A%3AKeyword%3A%3ATry)
to see how to catch exceptions.
- no\_clobber
@@ -472,6 +472,15 @@
use File::Slurp qw(:all);
```
+# SEE ALSO
+
+- [File::Slurper](https://metacpan.org/pod/File%3A%3ASlurper) - Provides a
straightforward set of functions for the most
+common tasks of reading/writing text and binary files.
+- [Path::Tiny](https://metacpan.org/pod/Path%3A%3ATiny) - Lightweight and
comprehensive file handling, including simple
+methods for reading, writing, and editing text and binary files.
+- [Mojo::File](https://metacpan.org/pod/Mojo%3A%3AFile) - Similar to
Path::Tiny for the [Mojo](https://metacpan.org/pod/Mojo) toolkit, always works
in
+bytes.
+
# AUTHOR
Uri Guttman, <`[email protected]`>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/File-Slurp-9999.30/lib/File/Slurp.pm
new/File-Slurp-9999.32/lib/File/Slurp.pm
--- old/File-Slurp-9999.30/lib/File/Slurp.pm 2020-03-09 15:23:03.000000000
+0100
+++ new/File-Slurp-9999.32/lib/File/Slurp.pm 2020-06-29 00:33:18.000000000
+0200
@@ -3,7 +3,7 @@
use strict;
use warnings ;
-our $VERSION = '9999.30';
+our $VERSION = '9999.32';
$VERSION = eval $VERSION;
use Carp ;
@@ -102,7 +102,7 @@
my $buf_ref = $opts->{buf_ref} || \$buf;
${$buf_ref} = '';
my $blk_size = $opts->{blk_size} || 1024 * 1024;
- if (my $size = -s $fh) {
+ if (my $size = -f $fh && -s _) {
$blk_size = $size if $size < $blk_size;
my ($pos, $read) = 0;
do {
@@ -119,7 +119,7 @@
seek($fh, $opts->{_data_tell}, SEEK_SET) if $opts->{_is_data} &&
$opts->{_data_tell};
# line endings if we're on Windows
- ${$buf_ref} =~ s/\015\012/\012/g if $is_win32 && !$opts->{binmode};
+ ${$buf_ref} =~ s/\015\012/\012/g if ${$buf_ref} && $is_win32 &&
!$opts->{binmode};
# we now have a buffer filled with the file content. Figure out how to
# return it to the user
@@ -1093,6 +1093,27 @@
use File::Slurp qw(:all);
+=head1 SEE ALSO
+
+=over
+
+=item *
+
+L<File::Slurper> - Provides a straightforward set of functions for the most
+common tasks of reading/writing text and binary files.
+
+=item *
+
+L<Path::Tiny> - Lightweight and comprehensive file handling, including simple
+methods for reading, writing, and editing text and binary files.
+
+=item *
+
+L<Mojo::File> - Similar to Path::Tiny for the L<Mojo> toolkit, always works in
+bytes.
+
+=back
+
=head1 AUTHOR
Uri Guttman, <F<[email protected]>>