redhotpenguin / perl-Archive-Zip

Archive::Zip as seen at https://metacpan.org/pod/Archive::Zip
Other
15 stars 44 forks source link

Don't include Data::Dumper if you don't need to #93

Closed petdance closed 3 years ago

petdance commented 3 years ago

It looks like Archive::Zip::Archive loads Data::Dumper unconditionally, and so using Archive::Zip also pulls in Data::Dumper, which is very large and unnecessary. It would help if the use Data::Dumper; were removed.

use warnings;
use strict;
use 5.010;

use Archive::Zip;

say for sort keys %INC;

Archive/Zip.pm
Archive/Zip/Archive.pm
Archive/Zip/DirectoryMember.pm
Archive/Zip/FileMember.pm
Archive/Zip/Member.pm
Archive/Zip/NewFileMember.pm
Archive/Zip/StringMember.pm
Archive/Zip/ZipFileMember.pm
Carp.pm
Carp/Heavy.pm
Compress/Raw/Zlib.pm
Config.pm
Cwd.pm
Data/Dumper.pm
Encode.pm
Encode/Alias.pm
Encode/Config.pm
Encode/Encoding.pm
Errno.pm
Exporter.pm
Exporter/Heavy.pm
Fcntl.pm
File/Basename.pm
File/Copy.pm
File/Find.pm
File/Path.pm
File/Spec.pm
File/Spec/Unix.pm
File/Temp.pm
FileHandle.pm
IO.pm
IO/File.pm
IO/Handle.pm
IO/Seekable.pm
List/Util.pm
Scalar/Util.pm
SelectSaver.pm
Symbol.pm
Time/Local.pm
XSLoader.pm
bytes.pm
constant.pm
integer.pm
overload.pm
overloading.pm
parent.pm
strict.pm
vars.pm
warnings.pm
warnings/register.pm
pmqs commented 3 years ago

What version of Archive::Zip are you running?

I have 1.68 installed

$ perl -MArchive::Zip -M5.010 -e ' say $Archive::Zip::VERSION'
1.68

I see no Data::Dumper

$ perl -MArchive::Zip -M5.010 -e 'say for sort keys %INC'
Archive/Zip.pm
Archive/Zip/Archive.pm
Archive/Zip/DirectoryMember.pm
Archive/Zip/FileMember.pm
Archive/Zip/Member.pm
Archive/Zip/NewFileMember.pm
Archive/Zip/StringMember.pm
Archive/Zip/ZipFileMember.pm
Carp.pm
Carp/Heavy.pm
Compress/Raw/Zlib.pm
Config.pm
Cwd.pm
Encode.pm
Encode/Alias.pm
Encode/Config.pm
Encode/Encoding.pm
Encode/MIME/Name.pm
Errno.pm
Exporter.pm
Exporter/Heavy.pm
Fcntl.pm
File/Basename.pm
File/Copy.pm
File/Find.pm
File/Path.pm
File/Spec.pm
File/Spec/Unix.pm
File/Temp.pm
FileHandle.pm
IO.pm
IO/File.pm
IO/Handle.pm
IO/Seekable.pm
List/Util.pm
Scalar/Util.pm
SelectSaver.pm
Storable.pm
Symbol.pm
Time/HiRes.pm
Time/Local.pm
XSLoader.pm
bytes.pm
constant.pm
integer.pm
overload.pm
overloading.pm
parent.pm
strict.pm
vars.pm
warnings.pm
warnings/register.pm
petdance commented 3 years ago

I was on 1.57. I apologize, I should have checked to see if this had been updated in a more recent version.