diff -Nru libsys-filesystem-perl-1.406/Changes libsys-filesystem-perl-1.408/Changes --- libsys-filesystem-perl-1.406/Changes 2014-05-13 12:20:18.000000000 +0000 +++ libsys-filesystem-perl-1.408/Changes 2020-10-21 12:02:31.000000000 +0000 @@ -1,5 +1,17 @@ Revision history for CPAN distribution Sys-Filesystem +1.408 2020-10-30 + - add correct (Apache 2.0) license to meta-data + - re-release 1.407_001 without further changes + +1.407_001 2020-09-29 + - improve distribution quality with new author tests + - Cygwin: ensure "/" is returned (Fixes RT#102669), thanks to Christian + Carey for reporting and providing the fix and to Christian Walde for + verifying + - Fix minor typos in the POD (Thanks to Mohammad S Anwar) + - Mention Sys::Filesystem::MountPoint (fixes RT#61988) + 1.406 2014-05-13 - always use global kernel mount table (/proc/mounts), not the process mirror diff -Nru libsys-filesystem-perl-1.406/debian/changelog libsys-filesystem-perl-1.408/debian/changelog --- libsys-filesystem-perl-1.406/debian/changelog 2015-10-13 18:41:19.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/changelog 2020-10-24 22:13:26.000000000 +0000 @@ -1,3 +1,38 @@ +libsys-filesystem-perl (1.408-1) unstable; urgency=medium + + * Team upload. + + [ Salvatore Bonaccorso ] + * debian/control: Use HTTPS transport protocol for Vcs-Git URI + + [ gregor herrmann ] + * debian/copyright: change Copyright-Format 1.0 URL to HTTPS. + + [ Salvatore Bonaccorso ] + * debian/control: Remove Franck Joncourt from Uploaders. + Thanks to Tobias Frost (Closes: #831316) + + [ gregor herrmann ] + * Remove Alejandro Garrido Mota from Uploaders. Thanks for your work! + * Remove Jonathan Yu from Uploaders. Thanks for your work! + + [ Salvatore Bonaccorso ] + * Update Vcs-* headers for switch to salsa.debian.org + + [ gregor herrmann ] + * debian/watch: use uscan version 4. + * Import upstream version 1.408. + * Refresh 0001-Make-the-test-suite-not-fail-on-build-hosts-with-no-.patch. + * Update years of upstream copyright. + * Declare compliance with Debian Policy 4.5.0. + * Set Rules-Requires-Root: no. + * Annotate test-only build dependencies with . + * Bump debhelper-compat to 13. + * Use HTTPS for some URLs in debian/. + Thanks to duck. + + -- gregor herrmann Sun, 25 Oct 2020 00:13:26 +0200 + libsys-filesystem-perl (1.406-2) unstable; urgency=medium * Team upload. diff -Nru libsys-filesystem-perl-1.406/debian/compat libsys-filesystem-perl-1.408/debian/compat --- libsys-filesystem-perl-1.406/debian/compat 2015-10-13 18:17:35.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -8 diff -Nru libsys-filesystem-perl-1.406/debian/control libsys-filesystem-perl-1.408/debian/control --- libsys-filesystem-perl-1.406/debian/control 2015-10-13 18:40:39.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/control 2020-10-24 22:13:26.000000000 +0000 @@ -1,25 +1,23 @@ Source: libsys-filesystem-perl Maintainer: Debian Perl Group -Uploaders: Alejandro Garrido Mota , - Jonathan Yu , - Franck Joncourt , - Ansgar Burchardt +Uploaders: Ansgar Burchardt Section: perl +Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 8), +Build-Depends: debhelper-compat (= 13), perl -Build-Depends-Indep: libmodule-pluggable-perl, - libparams-util-perl -Standards-Version: 3.9.5 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libsys-filesystem-perl.git -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libsys-filesystem-perl.git +Build-Depends-Indep: libmodule-pluggable-perl , + libparams-util-perl +Standards-Version: 4.5.0 +Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libsys-filesystem-perl +Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libsys-filesystem-perl.git Homepage: https://metacpan.org/release/Sys-Filesystem -Testsuite: autopkgtest-pkg-perl +Rules-Requires-Root: no Package: libsys-filesystem-perl Architecture: all -Depends: ${perl:Depends}, - ${misc:Depends}, +Depends: ${misc:Depends}, + ${perl:Depends}, libmodule-pluggable-perl, libparams-util-perl Description: Perl module to retrieve list of filesystems and their properties @@ -27,4 +25,3 @@ filesystem names and their properties. It hopes to provide a consistent API to list all, mounted, unmounted and special filesystems on a system, and query as many properties as possible with common aliases wherever possible. - diff -Nru libsys-filesystem-perl-1.406/debian/copyright libsys-filesystem-perl-1.408/debian/copyright --- libsys-filesystem-perl-1.406/debian/copyright 2015-10-13 18:17:35.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/copyright 2020-10-24 22:13:26.000000000 +0000 @@ -1,11 +1,11 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Sys-Filesystem Upstream-Contact: Jens Rehsack Source: https://metacpan.org/release/Sys-Filesystem Files: * Copyright: 2004-2006, Nicola Worthington - 2008-2014, Jens Rehsack + 2008-2020, Jens Rehsack License: Apache-2.0 Files: debian/* @@ -19,7 +19,7 @@ you may not use this file except in compliance with the License. . You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff -Nru libsys-filesystem-perl-1.406/debian/patches/0001-Make-the-test-suite-not-fail-on-build-hosts-with-no-.patch libsys-filesystem-perl-1.408/debian/patches/0001-Make-the-test-suite-not-fail-on-build-hosts-with-no-.patch --- libsys-filesystem-perl-1.406/debian/patches/0001-Make-the-test-suite-not-fail-on-build-hosts-with-no-.patch 2015-10-13 18:35:48.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/patches/0001-Make-the-test-suite-not-fail-on-build-hosts-with-no-.patch 2020-10-24 22:13:26.000000000 +0000 @@ -12,19 +12,14 @@ t/02_basic.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/t/02_basic.t b/t/02_basic.t -index c43fd06..931664e 100644 --- a/t/02_basic.t +++ b/t/02_basic.t -@@ -23,7 +23,7 @@ my @special_filesystems = $fs->special_filesystems(); +@@ -23,7 +23,7 @@ my @regular_filesystems = $fs->regular_filesystems(); --ok( @regular_filesystems, 'Get list of regular filesystems' ); -+ok( @regular_filesystems + @special_filesystems, 'Get list of regular and special filesystems' ); - ok( @filesystems, 'Get list of all filesystems' ); +-ok(@regular_filesystems, 'Get list of regular filesystems'); ++ok(@regular_filesystems + @special_filesystems, 'Get list of regular and special filesystems'); + ok(@filesystems, 'Get list of all filesystems'); - diag( join( ' - ', qw(filesystem mounted special device options format volume label type) ) ); --- -2.5.1 - + diag(join(' - ', qw(filesystem mounted special device options format volume label type))); diff -Nru libsys-filesystem-perl-1.406/debian/upstream/metadata libsys-filesystem-perl-1.408/debian/upstream/metadata --- libsys-filesystem-perl-1.406/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/upstream/metadata 2020-10-24 22:13:26.000000000 +0000 @@ -0,0 +1,4 @@ +--- +Bug-Database: https://rt.cpan.org/Public/Dist/Display.html?Name=Sys-Filesystem +Repository: https://github.com/rehsack/Sys-Filesystem.git +Repository-Browse: https://github.com/rehsack/Sys-Filesystem diff -Nru libsys-filesystem-perl-1.406/debian/watch libsys-filesystem-perl-1.408/debian/watch --- libsys-filesystem-perl-1.406/debian/watch 2015-10-13 18:17:35.000000000 +0000 +++ libsys-filesystem-perl-1.408/debian/watch 2020-10-24 22:13:26.000000000 +0000 @@ -1,3 +1,3 @@ -version=3 +version=4 opts="uversionmangle=s/\.\d{2}$/$&0/" \ -https://metacpan.org/release/Sys-Filesystem .*/Sys-Filesystem-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ +https://metacpan.org/release/Sys-Filesystem .*/Sys-Filesystem-v?@ANY_VERSION@@ARCHIVE_EXT@$ diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Aix.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Aix.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Aix.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Aix.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,10 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2008,2009 Jens Rehsack +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -34,7 +33,7 @@ use Cwd 'abs_path'; use IO::File; -$VERSION = '1.406'; +$VERSION = '1.408'; sub version() { @@ -54,90 +53,91 @@ # see AIX commands at # http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.doc/doc/base/alphabeticallistofcommands.htm +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{fstab} ||= '/etc/filesystems'; local $/ = "\n"; my %curr_mountz = map { my $path = $_ =~ m/^\s/ ? (split)[1] : (split)[2]; - ( $path => 1 ); + ($path => 1); } qx( /usr/sbin/mount ); my %fs_info = map { - my ( $path, $device, $vfs, $nodename, $type, $size, $options, $mount, $account ) = - split( m/:/, $_ ); + my ($path, $device, $vfs, $nodename, $type, $size, $options, $mount, $account) = + split(m/:/, $_); - ( $path => [ $device, $vfs, $nodename, $type, $size, $options, $mount, $account ] ) + ($path => [$device, $vfs, $nodename, $type, $size, $options, $mount, $account]) } grep { m/^[^#]/ } qx( /usr/sbin/lsfs -c ); - foreach my $current_filesystem ( keys %fs_info ) + foreach my $current_filesystem (keys %fs_info) { $self->{$current_filesystem}->{filesystem} = $current_filesystem; - my ( $device, $vfs, $nodename, $type, $size, $options, $mount, $account ) = - @{ $fs_info{$current_filesystem} }; + my ($device, $vfs, $nodename, $type, $size, $options, $mount, $account) = + @{$fs_info{$current_filesystem}}; $args{canondev} and -l $device and $device = abs_path($device); - $self->{$current_filesystem}->{dev} = $device; - $self->{$current_filesystem}->{vfs} = $vfs; - $self->{$current_filesystem}->{options} = $options; - $self->{$current_filesystem}->{nodename} = $nodename; - $self->{$current_filesystem}->{type} = $type; - $self->{$current_filesystem}->{size} = $size; - $self->{$current_filesystem}->{mount} = $mount; - $self->{$current_filesystem}->{account} = $account; - $self->{$current_filesystem}->{special} = 1 - if ( defined($vfs) && defined( $special_fs{$vfs} ) ); + $self->{$current_filesystem}->{dev} = $device; + $self->{$current_filesystem}->{vfs} = $vfs; + $self->{$current_filesystem}->{options} = $options; + $self->{$current_filesystem}->{nodename} = $nodename; + $self->{$current_filesystem}->{type} = $type; + $self->{$current_filesystem}->{size} = $size; + $self->{$current_filesystem}->{mount} = $mount; + $self->{$current_filesystem}->{account} = $account; + $self->{$current_filesystem}->{special} = 1 + if (defined($vfs) && defined($special_fs{$vfs})); # the filesystem is either currently mounted or is not, # this does not need to be checked for each individual # attribute. - my $state = defined( $curr_mountz{$current_filesystem} ) ? 'mounted' : 'unmounted'; + my $state = defined($curr_mountz{$current_filesystem}) ? 'mounted' : 'unmounted'; $self->{$current_filesystem}->{$state} = 1; } my @active_vgs = qx(/usr/sbin/lsvg -Lo); scalar @active_vgs and %fs_info = map { - my ( $lvname, $type, $lps, $pps, $pvs, $lvstate, $path ) = split( m/\s+/, $_ ); + my ($lvname, $type, $lps, $pps, $pvs, $lvstate, $path) = split(m/\s+/, $_); - ( $path => [ $lvname, $type, $lps, $pps, $pvs, $lvstate ] ) + ($path => [$lvname, $type, $lps, $pps, $pvs, $lvstate]) } grep { $_ !~ m/^\w+:$/ } grep { $_ !~ m/^LV\sNAME\s+/ } grep { $_ !~ m(N/A$) } qx( /usr/sbin/lsvg -Ll `/usr/sbin/lsvg -Lo` ); - foreach my $current_filesystem ( keys %fs_info ) + foreach my $current_filesystem (keys %fs_info) { $self->{$current_filesystem}->{filesystem} = $current_filesystem; - my ( $lvname, $type, $lps, $pps, $pvs, $lvstate ) = @{ $fs_info{$current_filesystem} }; + my ($lvname, $type, $lps, $pps, $pvs, $lvstate) = @{$fs_info{$current_filesystem}}; $args{canondev} and -l $lvname and $lvname = abs_path($lvname); - $self->{$current_filesystem}->{dev} = $lvname; - $self->{$current_filesystem}->{vfs} = $type; - $self->{$current_filesystem}->{LPs} = $lps; - $self->{$current_filesystem}->{PPs} = $pps; - $self->{$current_filesystem}->{PVs} = $pvs; - $self->{$current_filesystem}->{lvstate} = $lvstate; - $self->{$current_filesystem}->{special} = 1 - if ( defined($type) && defined( $special_fs{$type} ) ); + $self->{$current_filesystem}->{dev} = $lvname; + $self->{$current_filesystem}->{vfs} = $type; + $self->{$current_filesystem}->{LPs} = $lps; + $self->{$current_filesystem}->{PPs} = $pps; + $self->{$current_filesystem}->{PVs} = $pvs; + $self->{$current_filesystem}->{lvstate} = $lvstate; + $self->{$current_filesystem}->{special} = 1 + if (defined($type) && defined($special_fs{$type})); # the filesystem is either currently mounted or is not, # this does not need to be checked for each individual # attribute. - my $state = defined( $curr_mountz{$current_filesystem} ) ? 'mounted' : 'unmounted'; + my $state = defined($curr_mountz{$current_filesystem}) ? 'mounted' : 'unmounted'; $self->{$current_filesystem}->{$state} = 1; } # Read the fstab - if ( my $fstab = IO::File->new( $args{fstab}, 'r' ) ) + if (my $fstab = IO::File->new($args{fstab}, 'r')) { my $current_filesystem = '*UNDEFINED*'; while (<$fstab>) @@ -154,12 +154,12 @@ # the filesystem is either currently mounted or is not, # this does not need to be checked for each individual # attribute. - my $state = defined( $curr_mountz{$current_filesystem} ) ? 'mounted' : 'unmounted'; + my $state = defined($curr_mountz{$current_filesystem}) ? 'mounted' : 'unmounted'; $self->{$current_filesystem}{$state} = 1; # This matches a filesystem attribute } - elsif ( my ( $key, $value ) = $_ =~ /^\s*([a-z]{3,8})\s+=\s+"?(.+)"?\s*$/ ) + elsif (my ($key, $value) = $_ =~ /^\s*([a-z]{3,8})\s+=\s+"?(.+)"?\s*$/) { # do not overwrite already known data defined $self->{$current_filesystem}->{$key} and next; @@ -167,7 +167,7 @@ $key eq "dev" and $args{canondev} and -l $value and $value = abs_path($value); $self->{$current_filesystem}->{$key} = $value; - if ( ( $key eq 'vfs' ) && defined( $special_fs{$value} ) ) + if (($key eq 'vfs') && defined($special_fs{$value})) { $self->{$current_filesystem}->{special} = 1; } @@ -180,7 +180,7 @@ croak "Unable to open fstab file ($args{fstab})\n"; } - $self; + return $self; } 1; @@ -338,10 +338,6 @@ Manpage includes all known options, describes the format and comment char's. -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -352,11 +348,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2008-2014 Jens Rehsack. +Copyright 2008-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Cygwin.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Cygwin.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Cygwin.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Cygwin.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,9 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,13 +27,12 @@ use strict; use warnings; -use vars qw($VERSION @ISA); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); use Carp qw(croak); -require Sys::Filesystem::Unix; -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -47,22 +46,23 @@ devpts => 1, tmpfs => 1, ); -my $mount_rx = qr/^\s*(.+?)\s+on\s+(\/.+?)\s+type\s+(\S+)\s+\((\S+)\)\s*$/; +my $mount_rx = qr/^\s*(.+?)\s+on\s+(\/.*)\s+type\s+(\S+)\s+\((\S+)\)\s*$/; +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; local $/ = "\n"; my @mounts = qx( mount ); - $self->readMounts( $mount_rx, [ 0, 1, 2 ], \@keys, \%special_fs, @mounts ); + $self->readMounts($mount_rx, [0, 1, 2], \@keys, \%special_fs, @mounts); delete $self->{canondev}; - $self; + return $self; } 1; @@ -136,10 +136,6 @@ L -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -150,11 +146,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2008-2014 Jens Rehsack. +Copyright 2008-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Darwin.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Darwin.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Darwin.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Darwin.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,10 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2008,2009 Jens Rehsack +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,15 +27,14 @@ use strict; use warnings; -use vars qw(@ISA $VERSION); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); -require Sys::Filesystem::Unix; use IPC::Cmd (); use Carp qw(croak); -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -51,6 +49,7 @@ autofs => 1, ); +## no critic (RegularExpressions::ProhibitComplexRegexes) my $dt_rx = qr/Disk\sAppeared\s+\('([^']+)',\s* Mountpoint\s*=\s*'([^']+)',\s* fsType\s*=\s*'([^']*)',\s* @@ -60,37 +59,37 @@ sub new { - my ( $class, %args ) = @_; - my $self = bless( {}, $class ); + my ($class, %args) = @_; + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; foreach my $prog (qw(diskutil disktool mount)) { defined $args{$prog} - or $args{$prog} = ( grep { defined $_ and -x $_ } ( "/usr/sbin/$prog", "/sbin/$prog" ) )[0]; + or $args{$prog} = (grep { defined $_ and -x $_ } ("/usr/sbin/$prog", "/sbin/$prog"))[0]; } my @list_fs_cmd; - defined $args{diskutil} and $args{diskutil} and @list_fs_cmd = ( $args{diskutil}, "list" ); - ( 0 == scalar @list_fs_cmd ) + defined $args{diskutil} and $args{diskutil} and @list_fs_cmd = ($args{diskutil}, "list"); + (0 == scalar @list_fs_cmd) and defined $args{disktool} and $args{disktool} - and @list_fs_cmd = ( $args{disktool}, "-l" ); + and @list_fs_cmd = ($args{disktool}, "-l"); @list_fs_cmd or croak("No command to list file systems ..."); # don't use backticks, don't use the shell my @fslist = (); my @mntlist = (); - open( my $dt_fh, '-|' ) + open(my $dt_fh, '-|') or exec(@list_fs_cmd) - or croak( "Cannot execute " . join( " ", @list_fs_cmd ) . ": $!" ); + or croak("Cannot execute " . join(" ", @list_fs_cmd) . ": $!"); @fslist = <$dt_fh>; close($dt_fh); - open( my $m_fh, '-|' ) or exec( $args{mount} ) or croak("Cannot execute $args{mount}: $!"); + open(my $m_fh, '-|') or exec($args{mount}) or croak("Cannot execute $args{mount}: $!"); @mntlist = <$m_fh>; close($m_fh); - $self->readMounts( $dt_rx, [ 0, 1, 2 ], \@dt_keys, \%special_fs, @fslist ); + $self->readMounts($dt_rx, [0, 1, 2], \@dt_keys, \%special_fs, @fslist); #foreach (@fslist) #{ @@ -108,8 +107,8 @@ # $self->{$mount_point}->{label} = $name; #} - $self->readMounts( $mount_rx1, [ 0, 1, 2 ], \@mount_keys1, \%special_fs, @mntlist ); - $self->readMounts( $mount_rx2, [ 0, 1 ], \@mount_keys2, undef, @mntlist ); + $self->readMounts($mount_rx1, [0, 1, 2], \@mount_keys1, \%special_fs, @mntlist); + $self->readMounts($mount_rx2, [0, 1], \@mount_keys2, undef, @mntlist); # set the mount options #foreach (@mntlist) @@ -124,7 +123,7 @@ delete $self->{canondev}; - $self; + return $self; } 1; @@ -220,10 +219,6 @@ L, L -=head1 VERSION - -$Id$ - =head1 AUTHOR Christian Renz @@ -233,11 +228,11 @@ =head1 COPYRIGHT Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. + +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Dummy.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Dummy.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Dummy.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Dummy.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,9 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,23 +26,25 @@ use 5.008001; use strict; +use warnings; use Carp qw(croak); use vars qw($VERSION); -$VERSION = '1.406'; +$VERSION = '1.408'; sub version() { return $VERSION; } +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); - $self; + return $self; } 1; @@ -72,10 +74,6 @@ =back -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -86,11 +84,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Freebsd.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Freebsd.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Freebsd.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Freebsd.pm 2020-10-21 11:57:11.000000000 +0000 @@ -1,10 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2009 Jens Rehsack +# Copyright 2009-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,13 +27,12 @@ use strict; use warnings; -use vars qw(@ISA $VERSION); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); -require Sys::Filesystem::Unix; use Carp qw(croak); -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -49,29 +47,32 @@ tmpfs => 1, ); +## no critic (RegularExpressions::ProhibitComplexRegexes) my $mount_rx = qr|^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)|; my $swap_rx = qr|^(/[/\w]+)\s+|; +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; $args{fstab} ||= $ENV{PATH_FSTAB} || '/etc/fstab'; + ## no critic (ControlStructures::ProhibitMutatingListFunctions) my @mounts = map { $_ =~ s/[\cI]+/ /g; chomp; $_ } qx( /sbin/mount -p ); - $self->readMounts( $mount_rx, [ 0, 1, 2 ], \@keys, \%special_fs, @mounts ); - $self->readSwap( $swap_rx, qx( /sbin/swapctl -l ) ); - unless ( $self->readFsTab( $args{fstab}, \@keys, [ 0, 1, 2 ], \%special_fs ) ) + $self->readMounts($mount_rx, [0, 1, 2], \@keys, \%special_fs, @mounts); + $self->readSwap($swap_rx, qx( /sbin/swapctl -l )); + unless ($self->readFsTab($args{fstab}, \@keys, [0, 1, 2], \%special_fs)) { croak "Unable to open fstab file ($args{fstab})\n"; } delete $self->{canondev}; - $self; + return $self; } 1; @@ -161,10 +162,6 @@ L, L, L -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -175,7 +172,7 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Hpux.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Hpux.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Hpux.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Hpux.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,8 +1,9 @@ +############################################################ +# # Sys::Filesystem - Retrieve list of filesystems and their properties -# $Id$ # # Copyright (c) 2009 H.Merijn Brand, All rights reserved. -# Copyright (c) 2009 Jens Rehsack, All rights reserved. +# Copyright (c) 2009-2020 Jens Rehsack, All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,14 +25,12 @@ use strict; use warnings; -use vars qw($VERSION @ISA); - -require Sys::Filesystem::Unix; +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); use Carp qw(croak); -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -46,31 +45,32 @@ proc => 1 ); +## no critic (Subroutines::RequireArgUnpacking) sub new { my $proto = shift; my $class = ref($proto) || $proto or croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; # Defaults $args{fstab} ||= '/etc/fstab'; $args{mtab} ||= '/etc/mnttab'; - unless ( $self->readFsTab( $args{fstab}, \@fstabkeys, [ 0, 1, 2 ], \%special_fs ) ) + unless ($self->readFsTab($args{fstab}, \@fstabkeys, [0, 1, 2], \%special_fs)) { croak "Unable to open fstab file ($args{fstab})\n"; } - unless ( $self->readMntTab( $args{mtab}, \@mnttabkeys, [ 0, 1, 2 ], \%special_fs ) ) + unless ($self->readMntTab($args{mtab}, \@mnttabkeys, [0, 1, 2], \%special_fs)) { croak "Unable to open fstab file ($args{mtab})\n"; } delete $self->{canondev}; - $self; + return $self; } 1; @@ -101,10 +101,6 @@ =back -=head1 VERSION - -$Id$ - =head1 AUTHOR H.Merijn Brand, PROCURA B.V. @@ -113,11 +109,10 @@ Copyright 2009 H.Merijn Brand PROCURA B.V. -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Linux.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Linux.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Linux.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Linux.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,9 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,15 +27,14 @@ use strict; use warnings; -use vars qw($VERSION @ISA); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); use Carp qw(croak); use Cwd 'abs_path'; -use IO::File (); -use Sys::Filesystem::Unix (); +use IO::File (); -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -61,36 +60,37 @@ udev => 1, ); +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); # Defaults $args{fstab} ||= '/etc/fstab'; - $args{mtab} ||= -r '/proc/mounts' ? '/proc/mounts' : '/etc/mtab'; + $args{mtab} ||= -r '/proc/mounts' ? '/proc/mounts' : '/etc/mtab'; #$args{xtab} ||= '/etc/lib/nfs/xtab'; $args{canondev} and $self->{canondev} = 1; local $/ = "\n"; # Read the fstab - if ( my $fstab = IO::File->new( $args{fstab}, 'r' ) ) + if (my $fstab = IO::File->new($args{fstab}, 'r')) { while (<$fstab>) { - next if ( /^\s*#/ || /^\s*$/ ); - my @vals = split( ' ', $_ ); + next if (/^\s*#/ || /^\s*$/); + my @vals = split(' ', $_); $vals[0] =~ /^\s*LABEL=(.+)\s*$/ - and $self->{ $vals[1] }->{label} = $1; - $args{canondev} and -l $vals[0] and $vals[0] = abs_path( $vals[0] ); - $self->{ $vals[1] }->{mount_point} = $vals[1]; - $self->{ $vals[1] }->{device} = $vals[0]; - $self->{ $vals[1] }->{unmounted} = 1; - defined $special_fs{ $vals[2] } - and $self->{ $vals[1] }->{special} = 1; - @{ $self->{ $vals[1] } }{@keys} = @vals; + and $self->{$vals[1]}->{label} = $1; + $args{canondev} and -l $vals[0] and $vals[0] = abs_path($vals[0]); + $self->{$vals[1]}->{mount_point} = $vals[1]; + $self->{$vals[1]}->{device} = $vals[0]; + $self->{$vals[1]}->{unmounted} = 1; + defined $special_fs{$vals[2]} + and $self->{$vals[1]}->{special} = 1; + @{$self->{$vals[1]}}{@keys} = @vals; } $fstab->close(); } @@ -100,14 +100,14 @@ } # Read the mtab - unless ( $self->readMntTab( $args{mtab}, \@keys, [ 0, 1, 2 ], \%special_fs ) ) + unless ($self->readMntTab($args{mtab}, \@keys, [0, 1, 2], \%special_fs)) { croak "Unable to open fstab file ($args{mtab})\n"; } delete $self->{canondev}; - $self; + return $self; } 1; @@ -220,10 +220,6 @@ L, L, L -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -234,11 +230,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Mswin32.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Mswin32.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Mswin32.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Mswin32.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,9 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,19 +33,20 @@ use Win32::DriveInfo; use Carp qw(croak); -$VERSION = '1.406'; +$VERSION = '1.408'; sub version() { return $VERSION; } -my @volInfoAttrs = ( 'n/a', 'preserve case', 'case sensitive', 'unicode', 'acl', 'file compression', 'compressed volume' ); -my @typeExplain = ( 'unable to determine', 'no root directory', 'removeable', 'fixed', 'network', 'cdrom', 'ram disk' ); +my @volInfoAttrs = ('n/a', 'preserve case', 'case sensitive', 'unicode', 'acl', 'file compression', 'compressed volume'); +my @typeExplain = ('unable to determine', 'no root directory', 'removeable', 'fixed', 'network', 'cdrom', 'ram disk'); +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; my $self = {}; @@ -54,32 +55,32 @@ for my $drvletter (@drives) { my $type = Win32::DriveInfo::DriveType($drvletter); - my ( $VolumeName, $VolumeSerialNumber, $MaximumComponentLength, $FileSystemName, @attr ) = + my ($VolumeName, $VolumeSerialNumber, $MaximumComponentLength, $FileSystemName, @attr) = Win32::DriveInfo::VolumeInfo($drvletter); my $drvRoot = $drvletter . ":/"; - defined( _STRING($VolumeName) ) and $VolumeName =~ s/\\/\//g; - defined( _STRING($VolumeName) ) or $VolumeName = $drvRoot; + defined(_STRING($VolumeName)) and $VolumeName =~ s/\\/\//g; + defined(_STRING($VolumeName)) or $VolumeName = $drvRoot; $VolumeName = ucfirst($VolumeName); - $FileSystemName ||= 'CDFS' if ( $type == 5 ); + $FileSystemName ||= 'CDFS' if ($type == 5); # XXX Win32::DriveInfo gives no details here ... $self->{$drvRoot}->{mount_point} = $drvRoot; $self->{$drvRoot}->{device} = $VolumeName; # XXX Win32::DriveInfo gives sometime wrong information here - $self->{$drvRoot}->{format} = $FileSystemName; - $self->{$drvRoot}->{options} = join( ',', map { $volInfoAttrs[$_] } @attr ); - my $mntstate = ( ( defined $FileSystemName ) and $type > 1 ); + $self->{$drvRoot}->{format} = $FileSystemName; + $self->{$drvRoot}->{options} = join(',', map { $volInfoAttrs[$_] } @attr); + my $mntstate = ((defined $FileSystemName) and $type > 1); $mntstate and 2 == $type and $mntstate = Win32::DriveInfo::IsReady($drvletter); - $mntstate = $mntstate ? "mounted" : "unmounted"; - $self->{$drvRoot}->{$mntstate} = 1; + $mntstate = $mntstate ? "mounted" : "unmounted"; + $self->{$drvRoot}->{$mntstate} = 1; $type > 0 and $self->{$drvRoot}->{type} = $typeExplain[$type]; } - bless( $self, $class ); + bless($self, $class); return $self; } @@ -128,10 +129,6 @@ =back -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -147,11 +144,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Netbsd.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Netbsd.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Netbsd.pm 2014-05-13 13:45:57.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Netbsd.pm 2020-10-21 11:57:11.000000000 +0000 @@ -1,9 +1,8 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # -# Copyright 2009 Jens Rehsack +# Copyright 2009-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,13 +26,12 @@ use strict; use warnings; -use vars qw(@ISA $VERSION); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); -require Sys::Filesystem::Unix; use Carp qw(croak); -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -53,20 +51,21 @@ my $mount_rx = qr|^([/:\w]+)\s+on\s+([/\w]+)\s+type\s+(\w+)|; my $swap_rx = qr|^(/[/\w]+)\s+|; +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; # Defaults $args{fstab} ||= $ENV{PATH_FSTAB} || '/etc/fstab'; my @mounts = qx( /sbin/mount ); - $self->readMounts( $mount_rx, [ 0, 1, 2 ], [qw(fs_spec fs_file fs_vfstype fs_mntops)], \%special_fs, @mounts ); - $self->readSwap( $swap_rx, qx( /sbin/swapctl -l ) ); - unless ( $self->readFsTab( $args{fstab}, \@keys, [ 0, 1, 2 ], \%special_fs ) ) + $self->readMounts($mount_rx, [0, 1, 2], [qw(fs_spec fs_file fs_vfstype fs_mntops)], \%special_fs, @mounts); + $self->readSwap($swap_rx, qx( /sbin/swapctl -l )); + unless ($self->readFsTab($args{fstab}, \@keys, [0, 1, 2], \%special_fs)) { croak "Unable to open fstab file ($args{fstab})\n"; } @@ -141,17 +140,13 @@ =back -=head1 VERSION - -$Id$ - =head1 AUTHOR Jens Rehsack - L =head1 COPYRIGHT -Copyright 2009-2014 Jens Rehsack. +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Solaris.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Solaris.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Solaris.pm 2014-05-13 13:45:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Solaris.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,10 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2009 Jens Rehsack +# Copyright 2009-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,14 +27,14 @@ use strict; use warnings; -use vars qw($VERSION @ISA); +use vars qw($VERSION); +use parent qw(Sys::Filesystem::Unix); use Carp qw(croak); use Data::Dumper; require Sys::Filesystem::Unix; -$VERSION = '1.406'; -@ISA = qw(Sys::Filesystem::Unix); +$VERSION = '1.408'; sub version() { @@ -60,29 +59,30 @@ cachefs => 1, ); +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; $args{fstab} ||= '/etc/vfstab'; $args{mtab} ||= '/etc/mnttab'; - unless ( $self->readFsTab( $args{fstab}, \@fstab_keys, [ 0, 2, 3 ], \%special_fs ) ) + unless ($self->readFsTab($args{fstab}, \@fstab_keys, [0, 2, 3], \%special_fs)) { croak "Unable to open fstab file ($args{fstab})\n"; } - unless ( $self->readMntTab( $args{mtab}, \@mtab_keys, [ 0, 1, 2 ], \%special_fs ) ) + unless ($self->readMntTab($args{mtab}, \@mtab_keys, [0, 1, 2], \%special_fs)) { croak "Unable to open mtab file ($args{mtab})\n"; } delete $self->{canondev}; - $self; + return $self; } 1; @@ -159,10 +159,6 @@ L -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -172,11 +168,11 @@ =head1 COPYRIGHT Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2009-2014 Jens Rehsack. + +Copyright 2009-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Unix.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Unix.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem/Unix.pm 2014-05-13 13:45:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem/Unix.pm 2020-10-21 11:57:10.000000000 +0000 @@ -4,7 +4,7 @@ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2009 Jens Rehsack +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ use Fcntl qw(:flock); use IO::File; -$VERSION = '1.406'; +$VERSION = '1.408'; sub version() { @@ -49,168 +49,171 @@ proc => 1 ); +## no critic (Subroutines::RequireArgUnpacking) sub new { - ref( my $class = shift ) && croak 'Class name required'; + ref(my $class = shift) && croak 'Class name required'; my %args = @_; - my $self = bless( {}, $class ); + my $self = bless({}, $class); $args{canondev} and $self->{canondev} = 1; # Defaults $args{fstab} ||= '/etc/fstab'; $args{mtab} ||= '/etc/mtab'; - $self->readFsTab( $args{fstab}, \@keys, [ 0, 1, 2 ], \%special_fs ); - $self->readMntTab( $args{mtab}, \@keys, [ 0, 1, 2 ], \%special_fs ); + $self->readFsTab($args{fstab}, \@keys, [0, 1, 2], \%special_fs); + $self->readMntTab($args{mtab}, \@keys, [0, 1, 2], \%special_fs); delete $self->{canondev}; - $self; + return $self; } +## no critic (Subroutines::ProhibitSubroutinePrototypes) sub readFsTab($\@\@\%) { - my ( $self, $fstabPath, $fstabKeys, $pridx, $special_fs ) = @_; + my ($self, $fstabPath, $fstabKeys, $pridx, $special_fs) = @_; # Read the fstab local $/ = "\n"; - if ( my $fstab = IO::File->new( $fstabPath, 'r' ) ) + if (my $fstab = IO::File->new($fstabPath, 'r')) { while (<$fstab>) { - next if ( /^\s*#/ || /^\s*$/ ); + next if (/^\s*#/ || /^\s*$/); # $_ =~ s/#.*$//; # next if( /^\s*$/ ); - my @vals = split( ' ', $_ ); - $self->{canondev} and -l $vals[ $pridx->[0] ] and $vals[ $pridx->[0] ] = abs_path( $vals[ $pridx->[0] ] ); - $self->{ $vals[ $pridx->[1] ] }->{mount_point} = $vals[ $pridx->[1] ]; - $self->{ $vals[ $pridx->[1] ] }->{device} = $vals[ $pridx->[0] ]; - $self->{ $vals[ $pridx->[1] ] }->{unmounted} = 1 - unless ( defined( $self->{ $vals[ $pridx->[1] ] }->{mounted} ) ); + my @vals = split(' ', $_); + $self->{canondev} and -l $vals[$pridx->[0]] and $vals[$pridx->[0]] = abs_path($vals[$pridx->[0]]); + $self->{$vals[$pridx->[1]]}->{mount_point} = $vals[$pridx->[1]]; + $self->{$vals[$pridx->[1]]}->{device} = $vals[$pridx->[0]]; + $self->{$vals[$pridx->[1]]}->{unmounted} = 1 + unless (defined($self->{$vals[$pridx->[1]]}->{mounted})); - if ( defined( $pridx->[2] ) ) + if (defined($pridx->[2])) { - my $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ]; - $self->{ $vals[ $pridx->[1] ] }->{special} = 1 - if ( defined( $special_fs->{$vfs_type} ) ); + my $vfs_type = $self->{$vals[$pridx->[1]]}->{fs_vfstype} = $vals[$pridx->[2]]; + $self->{$vals[$pridx->[1]]}->{special} = 1 + if (defined($special_fs->{$vfs_type})); } else { - $self->{ $vals[ $pridx->[1] ] }->{special} = 0 - unless ( defined( $self->{ $vals[ $pridx->[1] ] }->{special} ) ); + $self->{$vals[$pridx->[1]]}->{special} = 0 + unless (defined($self->{$vals[$pridx->[1]]}->{special})); } - for ( my $i = 0; $i < @{$fstabKeys}; ++$i ) + for (my $i = 0; $i < @{$fstabKeys}; ++$i) { - $self->{ $vals[ $pridx->[1] ] }->{ $fstabKeys->[$i] } = - defined( $vals[$i] ) ? $vals[$i] : ''; + $self->{$vals[$pridx->[1]]}->{$fstabKeys->[$i]} = + defined($vals[$i]) ? $vals[$i] : ''; } } + $fstab->close(); - 1; - } - else - { - 0; + + return 1; } + + return 0; } sub readMntTab($\@\@\%) { - my ( $self, $mnttabPath, $mnttabKeys, $pridx, $special_fs ) = @_; + my ($self, $mnttabPath, $mnttabKeys, $pridx, $special_fs) = @_; # Read the mtab local $/ = "\n"; my $mtab; - if ( ( $mtab = IO::File->new( $mnttabPath, 'r' ) ) && flock( $mtab, LOCK_SH | LOCK_NB ) ) + if (($mtab = IO::File->new($mnttabPath, 'r')) && flock($mtab, LOCK_SH | LOCK_NB)) { while (<$mtab>) { - next if ( /^\s*#/ || /^\s*$/ ); + next if (/^\s*#/ || /^\s*$/); # $_ =~ s/#.*$//; # next if( /^\s*$/ ); - my @vals = split( /\s+/, $_ ); - $self->{canondev} and -l $vals[ $pridx->[0] ] and $vals[ $pridx->[0] ] = abs_path( $vals[ $pridx->[0] ] ); - delete $self->{ $vals[ $pridx->[1] ] }->{unmounted} - if ( exists( $self->{ $vals[ $pridx->[1] ] }->{unmounted} ) ); - $self->{ $vals[ $pridx->[1] ] }->{mounted} = 1; - $self->{ $vals[ $pridx->[1] ] }->{mount_point} = $vals[ $pridx->[1] ]; - $self->{ $vals[ $pridx->[1] ] }->{device} = $vals[ $pridx->[0] ]; + my @vals = split(/\s+/, $_); + $self->{canondev} and -l $vals[$pridx->[0]] and $vals[$pridx->[0]] = abs_path($vals[$pridx->[0]]); + delete $self->{$vals[$pridx->[1]]}->{unmounted} + if (exists($self->{$vals[$pridx->[1]]}->{unmounted})); + $self->{$vals[$pridx->[1]]}->{mounted} = 1; + $self->{$vals[$pridx->[1]]}->{mount_point} = $vals[$pridx->[1]]; + $self->{$vals[$pridx->[1]]}->{device} = $vals[$pridx->[0]]; - if ( defined( $pridx->[2] ) ) + if (defined($pridx->[2])) { - my $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ]; - $self->{ $vals[ $pridx->[1] ] }->{special} = 1 - if ( defined( $special_fs->{$vfs_type} ) ); + my $vfs_type = $self->{$vals[$pridx->[1]]}->{fs_vfstype} = $vals[$pridx->[2]]; + $self->{$vals[$pridx->[1]]}->{special} = 1 + if (defined($special_fs->{$vfs_type})); } else { - $self->{ $vals[ $pridx->[1] ] }->{special} = 0 - unless ( defined( $self->{ $vals[ $pridx->[1] ] }->{special} ) ); + $self->{$vals[$pridx->[1]]}->{special} = 0 + unless (defined($self->{$vals[$pridx->[1]]}->{special})); } - for ( my $i = 0; $i < @{$mnttabKeys}; ++$i ) + for (my $i = 0; $i < @{$mnttabKeys}; ++$i) { - $self->{ $vals[ $pridx->[1] ] }->{ $mnttabKeys->[$i] } = - defined( $vals[$i] ) ? $vals[$i] : ''; + $self->{$vals[$pridx->[1]]}->{$mnttabKeys->[$i]} = + defined($vals[$i]) ? $vals[$i] : ''; } } + $mtab->close(); - 1; - } - else - { - 0; + + return 1; } + + return 0; } +## no critic (Subroutines::ProhibitManyArgs) sub readMounts { - my ( $self, $mount_rx, $pridx, $keys, $special, @lines ) = @_; + my ($self, $mount_rx, $pridx, $keys, $special, @lines) = @_; foreach my $line (@lines) { - if ( my @vals = $line =~ $mount_rx ) + if (my @vals = $line =~ $mount_rx) { - $self->{canondev} and -l $vals[ $pridx->[0] ] and $vals[ $pridx->[0] ] = abs_path( $vals[ $pridx->[0] ] ); - $self->{ $vals[ $pridx->[1] ] }->{mount_point} = $vals[ $pridx->[1] ]; - $self->{ $vals[ $pridx->[1] ] }->{device} = $vals[ $pridx->[0] ]; - $self->{ $vals[ $pridx->[1] ] }->{mounted} = 1; - delete $self->{ $vals[ $pridx->[1] ] }->{unmounted} - if ( exists( $self->{ $vals[ $pridx->[1] ] }->{unmounted} ) ); + $self->{canondev} and -l $vals[$pridx->[0]] and $vals[$pridx->[0]] = abs_path($vals[$pridx->[0]]); + $self->{$vals[$pridx->[1]]}->{mount_point} = $vals[$pridx->[1]]; + $self->{$vals[$pridx->[1]]}->{device} = $vals[$pridx->[0]]; + $self->{$vals[$pridx->[1]]}->{mounted} = 1; + delete $self->{$vals[$pridx->[1]]}->{unmounted} + if (exists($self->{$vals[$pridx->[1]]}->{unmounted})); - if ( defined( $pridx->[2] ) ) + if (defined($pridx->[2])) { - my $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ]; - $self->{ $vals[ $pridx->[1] ] }->{special} = 1 - if ( defined( $special->{$vfs_type} ) ); + my $vfs_type = $self->{$vals[$pridx->[1]]}->{fs_vfstype} = $vals[$pridx->[2]]; + $self->{$vals[$pridx->[1]]}->{special} = 1 + if (defined($special->{$vfs_type})); } - elsif ( !defined( $self->{ $vals[ $pridx->[1] ] }->{special} ) ) + elsif (!defined($self->{$vals[$pridx->[1]]}->{special})) { - $self->{ $vals[ $pridx->[1] ] }->{special} = 0; + $self->{$vals[$pridx->[1]]}->{special} = 0; } - for ( my $i = 0; $i < @{$keys}; ++$i ) + for (my $i = 0; $i < @{$keys}; ++$i) { - $self->{ $vals[ $pridx->[1] ] }->{ $keys->[$i] } = - defined( $vals[$i] ) ? $vals[$i] : ''; + $self->{$vals[$pridx->[1]]}->{$keys->[$i]} = + defined($vals[$i]) ? $vals[$i] : ''; } } } - $self; + return $self; } sub readSwap { - my ( $self, $swap_rx, @lines ) = @_; + my ($self, $swap_rx, @lines) = @_; foreach my $line (@lines) { - if ( my ($dev) = $line =~ $swap_rx ) + if (my ($dev) = $line =~ $swap_rx) { $self->{canondev} and -l $dev and $dev = abs_path($dev); $self->{none}->{mount_point} ||= 'none'; @@ -221,7 +224,8 @@ delete $self->{none}->{unmounted}; } } - $self; + + return $self; } 1; @@ -354,10 +358,6 @@ =back -=head1 VERSION - -$Id$ - =head1 AUTHOR Nicola Worthington - L @@ -367,11 +367,11 @@ =head1 COPYRIGHT Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2008-2014 Jens Rehsack. + +Copyright 2008-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/lib/Sys/Filesystem.pm libsys-filesystem-perl-1.408/lib/Sys/Filesystem.pm --- libsys-filesystem-perl-1.406/lib/Sys/Filesystem.pm 2014-05-13 13:45:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/lib/Sys/Filesystem.pm 2020-10-21 11:57:10.000000000 +0000 @@ -1,10 +1,9 @@ ############################################################ # -# $Id$ # Sys::Filesystem - Retrieve list of filesystems and their properties # # Copyright 2004,2005,2006 Nicola Worthington -# Copyright 2008,2009 Jens Rehsack +# Copyright 2008-2020 Jens Rehsack # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,16 +25,17 @@ use 5.008001; -my @query_order; - use strict; use warnings; use vars qw($VERSION $AUTOLOAD $CANONDEV $FSTAB $MTAB); -use Carp qw(croak cluck confess); +use Carp qw(carp croak cluck confess); + +my @query_order; + use Module::Pluggable - require => 1, - only => [ @query_order = map { __PACKAGE__ . '::' . $_ } ( ucfirst( lc $^O ), $^O =~ m/Win32/i ? 'Win32' : 'Unix', 'Dummy' ) ], - inner => 0, + require => 1, + only => [@query_order = map { __PACKAGE__ . '::' . $_ } (ucfirst(lc $^O), $^O =~ m/Win32/i ? 'Win32' : 'Unix', 'Dummy')], + inner => 0, search_path => ['Sys::Filesystem'], sub_name => '_plugins'; use Params::Util qw(_INSTANCE); @@ -43,19 +43,20 @@ use List::Util qw(first); use constant DEBUG => $ENV{SYS_FILESYSTEM_DEBUG} ? 1 : 0; -use constant SPECIAL => ( 'darwin' eq $^O ) ? 0 : undef; +use constant SPECIAL => ('darwin' eq $^O) ? 0 : undef; -$VERSION = '1.406'; +$VERSION = '1.408'; -my ( $FsPlugin, $Supported ); +my ($FsPlugin, $Supported); BEGIN { + ## no critic (Subroutines::ProtectPrivateSubs) Sys::Filesystem->_plugins(); foreach my $qo (@query_order) { - next unless ( UNIVERSAL::isa( $qo, $qo ) ); + next unless (eval { $qo->isa($qo) }); $FsPlugin = $qo; last; } @@ -63,25 +64,26 @@ $Supported = $FsPlugin ne 'Sys::Filesystem::Unix' and $FsPlugin ne 'Sys::Filesystem::Dummy'; } +## no critic (Subroutines::RequireArgUnpacking) sub new { # Check we're being called correctly with a class name - ref( my $class = shift ) and croak 'Class name required'; + ref(my $class = shift) and croak 'Class name required'; # Check we've got something sane passed - croak 'Odd number of elements passed when even number was expected' if ( @_ % 2 ); + croak 'Odd number of elements passed when even number was expected' if (@_ % 2); my %args = @_; exists $args{xtab} and carp("Using xtab is depreciated") and delete $args{xtab}; - defined $FSTAB and not exists $args{fstab} and $args{fstab} = $FSTAB; - defined $MTAB and not exists $args{mtab} and $args{mtab} = $MTAB; - defined $CANONDEV and not exists $args{canondev} and $args{canondev} = $CANONDEV; + defined $FSTAB and not exists $args{fstab} and $args{fstab} = $FSTAB; + defined $MTAB and not exists $args{mtab} and $args{mtab} = $MTAB; + defined $CANONDEV and not exists $args{canondev} and $args{canondev} = $CANONDEV; # Double check the key pairs for stuff we recognise my @sane_keys = qw(aliases canondev fstab mtab); my %sane_args; @sane_args{@sane_keys} = delete @args{@sane_keys}; - scalar keys %args and croak( "Unrecognised parameter(s) '" . join( "', '", sort keys %args ) . "' passed to module $class" ); + scalar keys %args and croak("Unrecognised parameter(s) '" . join("', '", sort keys %args) . "' passed to module $class"); my $self = {%sane_args}; @@ -102,24 +104,24 @@ }; # Debug - DUMP( '$self', $self ) if (DEBUG); + DUMP('$self', $self) if (DEBUG); $self->{filesystems} = $FsPlugin->new(%sane_args); # Maybe upchuck a little - croak "Unable to create object for OS type '$self->{osname}'" unless ( $self->{filesystems} ); + croak "Unable to create object for OS type '$self->{osname}'" unless ($self->{filesystems}); # Bless and return - bless( $self, $class ); + bless($self, $class); return $self; } sub filesystems { my $self = shift; - unless ( defined( _INSTANCE( $self, __PACKAGE__ ) ) ) + unless (defined(_INSTANCE($self, __PACKAGE__))) { - unshift @_, $self unless ( 0 == ( scalar(@_) % 2 ) ); + unshift @_, $self unless (0 == (scalar(@_) % 2)); $self = __PACKAGE__->new(); } @@ -127,17 +129,17 @@ @_ % 2 and croak 'Odd number of elements passed when even number was expected'; my $params = {@_}; - for my $param ( keys %{$params} ) + for my $param (keys %{$params}) { croak "Illegal paramater '$param' passed to filesystems() method" - unless grep( m/^$param$/, qw(mounted unmounted special device regular) ); + unless grep { m/^$param$/ } qw(mounted unmounted special device regular); } # Invert logic for regular - if ( exists $params->{regular} ) + if (exists $params->{regular}) { delete $params->{regular}; - exists( $params->{special} ) + exists($params->{special}) and carp("Mutual exclusive parameters 'special' and 'regular' specified together"); $params->{special} = SPECIAL; } @@ -145,26 +147,27 @@ my @filesystems = (); # Return list of all filesystems - keys %{$params} or return sort( keys( %{ $self->{filesystems} } ) ); + ## no critic (Subroutines::ProhibitReturnSort) + keys %{$params} or return sort(keys(%{$self->{filesystems}})); - for my $fsname ( sort( keys( %{ $self->{filesystems} } ) ) ) + for my $fsname (sort(keys(%{$self->{filesystems}}))) { - for my $requirement ( keys( %{$params} ) ) + for my $requirement (keys(%{$params})) { my $fs = $self->{filesystems}->{$fsname}; my $fsreqname = - ( !exists $fs->{$requirement} and exists $self->{aliases}->{$requirement} ) - ? first { exists $fs->{$_} } @{ $self->{aliases}->{$requirement} } + (not exists $fs->{$requirement} and exists $self->{aliases}->{$requirement}) + ? first { exists $fs->{$_} } @{$self->{aliases}->{$requirement}} : $requirement; defined $params->{$requirement} and exists $fs->{$fsreqname} and $fs->{$fsreqname} eq $params->{$requirement} - and push( @filesystems, $fsname ) + and push(@filesystems, $fsname) and last; - push( @filesystems, $fsname ) and last - unless defined( $params->{$requirement} ) - or exists( $fs->{$fsreqname} ); + push(@filesystems, $fsname) and last + unless defined($params->{$requirement}) + or exists($fs->{$fsreqname}); } } @@ -179,34 +182,35 @@ sub mounted_filesystems { - return $_[0]->filesystems( mounted => 1 ); + return $_[0]->filesystems(mounted => 1); } sub unmounted_filesystems { - return $_[0]->filesystems( unmounted => 1 ); + return $_[0]->filesystems(unmounted => 1); } sub special_filesystems { - return $_[0]->filesystems( special => 1 ); + return $_[0]->filesystems(special => 1); } sub regular_filesystems { - return $_[0]->filesystems( special => SPECIAL ); + return $_[0]->filesystems(special => SPECIAL); } sub DESTROY { } +## no critic (ClassHierarchies::ProhibitAutoloading) sub AUTOLOAD { - my ( $self, $fsname ) = @_; + my ($self, $fsname) = @_; - croak "$self is not an object" unless ( blessed($self) ); + croak "$self is not an object" unless (blessed($self)); croak "No filesystem passed where expected" unless ($fsname); - ( my $name = $AUTOLOAD ) =~ s/.*://; + (my $name = $AUTOLOAD) =~ s/.*://; # No such filesystem exists $self->{filesystems}->{$fsname} or croak "No such filesystem"; @@ -218,24 +222,26 @@ # Didn't find the property, but check any aliases exists $self->{aliases}->{$name} - and $name = first { exists $fs->{$_} } @{ $self->{aliases}->{$name} } + and $name = first { exists $fs->{$_} } @{$self->{aliases}->{$name}} and return $fs->{$name}; return; } +## no critic (Subroutines::RequireFinalReturn) sub TRACE { return unless DEBUG; - warn( $_[0] ); + carp($_[0]); } sub DUMP { return unless DEBUG; + ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval) eval { require Data::Dumper; - warn( shift() . ': ' . Data::Dumper::Dumper( shift() ) ); + carp(shift() . ': ' . Data::Dumper::Dumper(shift())); }; } @@ -329,12 +335,12 @@ =item xtab B Specify the full path and filename of the mounted NFS -filesystem table (or xtab for short). This is usually only pertinant +filesystem table (or xtab for short). This is usually only pertinent to Unix bases systems. Not all helper modules will query NFS mounts as a separate exercise, and therefore this option may be ignored on some systems. -B of the OS plugins use that tunable (anymore?), so it now a warning +B of the OS plugins use that tunable (anymore?), so now a warning is raised when it's used. The entire support will be removed not before 2015. Once that happened, using C will raise an exception. @@ -350,7 +356,7 @@ Returns true if the operating system is supported by Sys::Filesystem. Unsupported operating systems may get less information, e.g. the mount -state couldn't determined or which file system type is special ins't +state couldn't determined or which file system type is special isn't known. =back @@ -597,11 +603,7 @@ =head1 SEE ALSO -L, L, L - -=head1 VERSION - -$Id$ +L, L, L, L =head1 AUTHOR @@ -617,11 +619,10 @@ Copyright 2004,2005,2006 Nicola Worthington. -Copyright 2008-2014 Jens Rehsack. +Copyright 2008-2020 Jens Rehsack. This software is licensed under The Apache Software License, Version 2.0. L =cut - diff -Nru libsys-filesystem-perl-1.406/Makefile.PL libsys-filesystem-perl-1.408/Makefile.PL --- libsys-filesystem-perl-1.406/Makefile.PL 2014-05-13 13:41:17.000000000 +0000 +++ libsys-filesystem-perl-1.408/Makefile.PL 2020-10-21 12:00:14.000000000 +0000 @@ -7,7 +7,7 @@ use vars qw($build); use FindBin; use File::Spec; -use lib File::Spec->catdir( $FindBin::Bin, 'lib' ); +use lib File::Spec->catdir($FindBin::Bin, 'lib'); use ExtUtils::MakeMaker; @@ -15,9 +15,9 @@ my @fs; $^O eq 'MSWin32' or eval { require Sys::Filesystem; - unless ( Sys::Filesystem->supported ) + unless (Sys::Filesystem->supported) { - printf( STDERR "Can't be used ($@) - OS not supported or bad maintained?" ); + printf(STDERR "Can't be used ($@) - OS not supported or bad maintained?"); exit(0); } }; @@ -52,7 +52,7 @@ WriteMakefile1( MIN_PERL_VERSION => '5.008001', META_ADD => { - 'meta-spec' => { version => 2 }, + 'meta-spec' => {version => 2}, resources => { homepage => 'https://metacpan.org/release/Sys-Filesystem', repository => { @@ -64,27 +64,33 @@ web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Sys-Filesystem', mailto => 'fsys-filesystem@rt.cpan.org', }, + license => 'apache_2_0', }, prereqs => { develop => { requires => { 'Test::CPAN::Changes' => 0, 'Test::CheckManifest' => 0, + 'Module::CPANTS::Analyse' => '0.96', + 'Test::Kwalitee' => 0, + 'Test::Perl::Critic' => 0, + 'Test::PerlTidy' => 0, 'Test::Pod' => 0, 'Test::Pod::Coverage' => 0, 'Test::Pod::Spelling::CommonMistakes' => 0, + 'Test::Spelling' => 0, }, }, configure => { requires => {%CONFIGURE_DEPS}, }, - build => { requires => {%BUILD_DEPS} }, - test => { requires => {%TEST_DEPS} }, + build => {requires => {%BUILD_DEPS}}, + test => {requires => {%TEST_DEPS}}, runtime => { recommends => { 'perl' => '5.018001', }, - requires => { %RUN_DEPS, }, + requires => {%RUN_DEPS,}, }, }, }, @@ -92,11 +98,11 @@ VERSION_FROM => 'lib/Sys/Filesystem.pm', ABSTRACT_FROM => 'lib/Sys/Filesystem.pm', LICENSE => 'Apache', - AUTHOR => [ q{Nicola Worthington }, q{Jens Rehsack } ], + AUTHOR => [q{Nicola Worthington }, q{Jens Rehsack }], PREREQ_PM => \%RUN_DEPS, BUILD_REQUIRES => \%BUILD_DEPS, TEST_REQUIRES => \%TEST_DEPS, - test => { TESTS => 't/*.t xt/*.t' }, + test => {TESTS => 't/*.t xt/*.t'}, ); sub WriteMakefile1 @@ -104,43 +110,43 @@ my %params = @_; my $eumm_version = $ExtUtils::MakeMaker::VERSION; $eumm_version = eval $eumm_version; - die "EXTRA_META is deprecated" if ( exists( $params{EXTRA_META} ) ); - die "License not specified" if ( !exists( $params{LICENSE} ) ); - if ( $params{TEST_REQUIRES} and ( $eumm_version < 6.6303 ) ) + die "EXTRA_META is deprecated" if (exists($params{EXTRA_META})); + die "License not specified" if (!exists($params{LICENSE})); + if ($params{TEST_REQUIRES} and ($eumm_version < 6.6303)) { - if ( $params{BUILD_REQUIRES} ) + if ($params{BUILD_REQUIRES}) { - $params{BUILD_REQUIRES} = { %{ $params{BUILD_REQUIRES} }, %{ $params{TEST_REQUIRES} } }; + $params{BUILD_REQUIRES} = {%{$params{BUILD_REQUIRES}}, %{$params{TEST_REQUIRES}}}; } else { $params{BUILD_REQUIRES} = delete $params{TEST_REQUIRES}; } } - if ( $params{BUILD_REQUIRES} and ( $eumm_version < 6.5503 ) ) + if ($params{BUILD_REQUIRES} and ($eumm_version < 6.5503)) { #EUMM 6.5502 has problems with BUILD_REQUIRES - $params{PREREQ_PM} = { %{ $params{PREREQ_PM} || {} }, %{ $params{BUILD_REQUIRES} } }; + $params{PREREQ_PM} = {%{$params{PREREQ_PM} || {}}, %{$params{BUILD_REQUIRES}}}; delete $params{BUILD_REQUIRES}; } - delete $params{CONFIGURE_REQUIRES} if ( $eumm_version < 6.52 ); - delete $params{MIN_PERL_VERSION} if ( $eumm_version < 6.48 ); - delete $params{META_MERGE} if ( $eumm_version < 6.46 ); - delete $params{META_ADD}{prereqs} if ( $eumm_version < 6.58 ); - delete $params{META_ADD}{'meta-spec'} if ( $eumm_version < 6.58 ); - delete $params{META_ADD} if ( $eumm_version < 6.46 ); - delete $params{LICENSE} if ( $eumm_version < 6.31 ); - delete $params{AUTHOR} if ( $] < 5.005 ); - delete $params{ABSTRACT_FROM} if ( $] < 5.005 ); - delete $params{BINARY_LOCATION} if ( $] < 5.005 ); + delete $params{CONFIGURE_REQUIRES} if ($eumm_version < 6.52); + delete $params{MIN_PERL_VERSION} if ($eumm_version < 6.48); + delete $params{META_MERGE} if ($eumm_version < 6.46); + delete $params{META_ADD}{prereqs} if ($eumm_version < 6.58); + delete $params{META_ADD}{'meta-spec'} if ($eumm_version < 6.58); + delete $params{META_ADD} if ($eumm_version < 6.46); + delete $params{LICENSE} if ($eumm_version < 6.31); + delete $params{AUTHOR} if ($] < 5.005); + delete $params{ABSTRACT_FROM} if ($] < 5.005); + delete $params{BINARY_LOCATION} if ($] < 5.005); # more or less taken from Moose' Makefile.PL - if ( $params{CONFLICTS} ) + if ($params{CONFLICTS}) { my $ok = CheckConflicts(%params); - exit(0) if ( $params{PREREQ_FATAL} and not $ok ); + exit(0) if ($params{PREREQ_FATAL} and not $ok); my $cpan_smoker = grep { $_ =~ m/(?:CR_SMOKER|CPAN_REPORTER|AUTOMATED_TESTING)/ } keys %ENV; - unless ( $cpan_smoker || $ENV{PERL_MM_USE_DEFAULT} ) + unless ($cpan_smoker || $ENV{PERL_MM_USE_DEFAULT}) { sleep 4 unless ($ok); } diff -Nru libsys-filesystem-perl-1.406/MANIFEST libsys-filesystem-perl-1.408/MANIFEST --- libsys-filesystem-perl-1.406/MANIFEST 2014-05-13 13:54:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/MANIFEST 2020-10-21 13:34:30.000000000 +0000 @@ -1,3 +1,4 @@ +.perltidyrc Changes CREDITS INSTALL @@ -15,7 +16,7 @@ lib/Sys/Filesystem/Unix.pm LICENSE Makefile.PL -MANIFEST +MANIFEST This list of files MANIFEST.SKIP NOTICE README diff -Nru libsys-filesystem-perl-1.406/MANIFEST.SKIP libsys-filesystem-perl-1.408/MANIFEST.SKIP --- libsys-filesystem-perl-1.406/MANIFEST.SKIP 2014-05-13 11:15:11.000000000 +0000 +++ libsys-filesystem-perl-1.408/MANIFEST.SKIP 2020-09-28 15:10:08.000000000 +0000 @@ -1,16 +1,17 @@ \B\.svn\b -\B\.git +\B\.git\b +\.gitignore$ +.travis.yml \.[Bb][Aa][Kk]$ \.orig$ \.old$ \.tdy$ +\.tmp$ \..*swp ^Makefile$ ^Build$ ^Build\.bat$ -CVS/.* -\.svn/.* -\.cvsignore$ +cover_db/ \.Inline/.* _Inline/.* \.bak$ @@ -21,10 +22,13 @@ ^tmp/ ^testdata/ ^blib/ +^sandbox/ ^pm_to_blib$ ^_build/.* ~$ +.*\.planner +.*\.lock +\.travis\.yml Sys-Filesystem-.* -^MYMETA\..*$ \bxt -\.travis.yml +^MYMETA.* diff -Nru libsys-filesystem-perl-1.406/META.json libsys-filesystem-perl-1.408/META.json --- libsys-filesystem-perl-1.406/META.json 2014-05-13 13:54:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/META.json 2020-10-21 13:34:30.000000000 +0000 @@ -5,13 +5,13 @@ "Jens Rehsack " ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141170", + "generated_by" : "ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter version 2.150010", "license" : [ "apache_2_0" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "Sys-Filesystem", "no_index" : { @@ -39,11 +39,16 @@ }, "develop" : { "requires" : { + "Module::CPANTS::Analyse" : "0.96", "Test::CPAN::Changes" : "0", "Test::CheckManifest" : "0", + "Test::Kwalitee" : "0", + "Test::Perl::Critic" : "0", + "Test::PerlTidy" : "0", "Test::Pod" : "0", "Test::Pod::Coverage" : "0", - "Test::Pod::Spelling::CommonMistakes" : "0" + "Test::Pod::Spelling::CommonMistakes" : "0", + "Test::Spelling" : "0" } }, "runtime" : { @@ -79,5 +84,6 @@ "web" : "https://github.com/rehsack/Sys-Filesystem" } }, - "version" : "1.406" + "version" : "1.408", + "x_serialization_backend" : "JSON::PP version 4.05" } diff -Nru libsys-filesystem-perl-1.406/META.yml libsys-filesystem-perl-1.408/META.yml --- libsys-filesystem-perl-1.406/META.yml 2014-05-13 13:54:58.000000000 +0000 +++ libsys-filesystem-perl-1.408/META.yml 2020-10-21 13:34:30.000000000 +0000 @@ -16,7 +16,7 @@ Module::Pluggable: '4.8' Params::Util: '1.00' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141170' +generated_by: 'ExtUtils::MakeMaker version 7.46, CPAN::Meta::Converter version 2.150010' license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -41,4 +41,5 @@ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Sys-Filesystem homepage: https://metacpan.org/release/Sys-Filesystem repository: https://github.com/rehsack/Sys-Filesystem -version: '1.406' +version: '1.408' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libsys-filesystem-perl-1.406/.perltidyrc libsys-filesystem-perl-1.408/.perltidyrc --- libsys-filesystem-perl-1.406/.perltidyrc 1970-01-01 00:00:00.000000000 +0000 +++ libsys-filesystem-perl-1.408/.perltidyrc 2020-09-29 04:21:56.000000000 +0000 @@ -0,0 +1,17 @@ +-b +-bl +-noll +-pt=2 +-bt=2 +-sbt=2 +-vt=0 +-vtc=0 +-dws +-aws +-nsfs +-asc +-bbt=0 +-cab=0 +-l=130 +-ole=unix +--noblanks-before-comments diff -Nru libsys-filesystem-perl-1.406/t/01_load.t libsys-filesystem-perl-1.408/t/01_load.t --- libsys-filesystem-perl-1.406/t/01_load.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/01_load.t 2020-09-29 04:31:26.000000000 +0000 @@ -10,7 +10,7 @@ use Config; -my $os_info = join( "-", $Config{osname}, $Config{osvers} ); -$^O eq "MSWin32" and eval "use Win32;" and $os_info = join( "-", Win32::GetOSName(), Win32::GetOSVersion() ); +my $os_info = join("-", $Config{osname}, $Config{osvers}); +$^O eq "MSWin32" and eval "use Win32;" and $os_info = join("-", Win32::GetOSName(), Win32::GetOSVersion()); diag("Testing Sys::Filesystem $Sys::Filesystem::VERSION, Perl $] ($^X) on $os_info"); diff -Nru libsys-filesystem-perl-1.406/t/02_basic.t libsys-filesystem-perl-1.408/t/02_basic.t --- libsys-filesystem-perl-1.406/t/02_basic.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/02_basic.t 2020-09-29 04:31:27.000000000 +0000 @@ -6,60 +6,60 @@ use Test::More; use Sys::Filesystem; -my ( $fs, @filesystems ); +my ($fs, @filesystems); eval { $fs = Sys::Filesystem->new(); @filesystems = $fs->filesystems(); }; $@ and plan skip_all => "Cannot initialize Sys::Filesystem: $@"; @filesystems or BAIL_OUT("Badly poor supported OS or no file systems found."); -ok( ref($fs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object' ); +ok(ref($fs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object'); -my @mounted_filesystems = $fs->mounted_filesystems(); -my @mounted_filesystems2 = $fs->filesystems( mounted => 1 ); -ok( "@mounted_filesystems" eq "@mounted_filesystems2", 'Compare mounted methods' ); +my @mounted_filesystems = $fs->mounted_filesystems(); +my @mounted_filesystems2 = $fs->filesystems(mounted => 1); +ok("@mounted_filesystems" eq "@mounted_filesystems2", 'Compare mounted methods'); my @unmounted_filesystems = $fs->unmounted_filesystems(); my @special_filesystems = $fs->special_filesystems(); my @regular_filesystems = $fs->regular_filesystems(); -ok( @regular_filesystems, 'Get list of regular filesystems' ); -ok( @filesystems, 'Get list of all filesystems' ); +ok(@regular_filesystems, 'Get list of regular filesystems'); +ok(@filesystems, 'Get list of all filesystems'); -diag( join( ' - ', qw(filesystem mounted special device options format volume label type) ) ); +diag(join(' - ', qw(filesystem mounted special device options format volume label type))); for my $filesystem (@filesystems) { - my $mounted = $fs->mounted($filesystem) || 0; + my $mounted = $fs->mounted($filesystem) || 0; my $unmounted = !$mounted; - ok( $mounted == grep( /^\Q$filesystem\E$/, @mounted_filesystems ), 'Mounted' ); - ok( $unmounted == grep( /^\Q$filesystem\E$/, @unmounted_filesystems ), 'Unmounted' ); + ok($mounted == grep(/^\Q$filesystem\E$/, @mounted_filesystems), 'Mounted'); + ok($unmounted == grep(/^\Q$filesystem\E$/, @unmounted_filesystems), 'Unmounted'); my $special = $fs->special($filesystem) || 0; my $regular = !$special; - ok( $special == grep( /^\Q$filesystem\E$/, @special_filesystems ), 'Special' ); - ok( $regular == grep( /^\Q$filesystem\E$/, @regular_filesystems ), 'Regular' ); + ok($special == grep(/^\Q$filesystem\E$/, @special_filesystems), 'Special'); + ok($regular == grep(/^\Q$filesystem\E$/, @regular_filesystems), 'Regular'); - my ( $device, $options, $format, $volume, $label, $type ); - ok( $device = $fs->device($filesystem), "Get device for $filesystem" ); - ok( defined( $options = $fs->options($filesystem) ), "Get options for $filesystem: $options" ); + my ($device, $options, $format, $volume, $label, $type); + ok($device = $fs->device($filesystem), "Get device for $filesystem"); + ok(defined($options = $fs->options($filesystem)), "Get options for $filesystem: $options"); SKIP: { $format = $fs->format($filesystem); - $mounted or skip( "Format might be unavailable unless mounted", 1 ); - ok( $format, "Get format for $filesystem" ); + $mounted or skip("Format might be unavailable unless mounted", 1); + ok($format, "Get format for $filesystem"); } - ok( $volume = $fs->volume($filesystem) || 1, "Get volume type for $filesystem" ); - ok( $label = $fs->label($filesystem) || 1, "Get label for $filesystem" ); + ok($volume = $fs->volume($filesystem) || 1, "Get volume type for $filesystem"); + ok($label = $fs->label($filesystem) || 1, "Get label for $filesystem"); $type = $fs->type($filesystem); diag( - join( ' - ', + join(' - ', $filesystem, $mounted, $special, $device, $options, - $format || 'n/a', $volume || 'n/a', $label || 'n/a', $type || 'n/a' ) + $format || 'n/a', $volume || 'n/a', $label || 'n/a', $type || 'n/a') ); } -my $device = $fs->device( $filesystems[0] ); -ok( my $foo_filesystem = Sys::Filesystem::filesystems( device => $device ), "Get filesystem attached to $device" ); +my $device = $fs->device($filesystems[0]); +ok(my $foo_filesystem = Sys::Filesystem::filesystems(device => $device), "Get filesystem attached to $device"); done_testing(); diff -Nru libsys-filesystem-perl-1.406/t/03_whereami.t libsys-filesystem-perl-1.408/t/03_whereami.t --- libsys-filesystem-perl-1.406/t/03_whereami.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/03_whereami.t 2020-09-29 04:31:26.000000000 +0000 @@ -9,43 +9,43 @@ use Config; my $RealTest = abs_path(__FILE__); -my $RealPerl = abs_path( $Config{perlpath} ); -if ( $^O ne 'VMS' ) +my $RealPerl = abs_path($Config{perlpath}); +if ($^O ne 'VMS') { $RealPerl .= $Config{_exe} unless $RealPerl =~ m/$Config{_exe}$/i; } -$RealTest = ucfirst($RealTest) if ( $^O =~ m/Win32/ ); +$RealTest = ucfirst($RealTest) if ($^O =~ m/Win32/); my $sfs; eval { $sfs = Sys::Filesystem->new(); }; $@ and plan skip_all => "Cannot initialize Sys::Filesystem: $@"; -ok( ref($sfs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object' ); +ok(ref($sfs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object'); -my ( $binmount, $mymount ); +my ($binmount, $mymount); -my @mounted_filesystems = sort { length($b) <=> length($a) } $sfs->filesystems( mounted => 1 ); +my @mounted_filesystems = sort { length($b) <=> length($a) } $sfs->filesystems(mounted => 1); SKIP: { unless (@mounted_filesystems) { - if ( $sfs->supported() ) + if ($sfs->supported()) { diag("Unexpected empty list of mounted filesystems"); } - skip( 'Badly poor supported OS or no file systems found.', 2 ); + skip('Badly poor supported OS or no file systems found.', 2); } foreach my $fs (@mounted_filesystems) { diag("Checking '$fs' being mountpoint for '$RealPerl' or '$RealTest' ...") - if ( $^O eq 'MSWin32' or $^O eq 'cygwin' ); - if ( !defined($binmount) && ( 0 == index( $RealPerl, $fs ) ) ) + if ($^O eq 'MSWin32' or $^O eq 'cygwin'); + if (!defined($binmount) && (0 == index($RealPerl, $fs))) { $binmount = $fs; } - if ( !defined($mymount) && ( 0 == index( $RealTest, $fs ) ) ) + if (!defined($mymount) && (0 == index($RealTest, $fs))) { $mymount = $fs; } @@ -53,8 +53,8 @@ TODO: { local $TODO = "Known fail for MSWin32, cygwin & Co. - let's make it not so important ..."; - ok( $mymount, sprintf( q{Found mountpoint for test file '%s' at '%s'}, $RealTest, $mymount || '' ) ); - ok( $binmount, sprintf( q{Found mountpoint for perl executable '%s' at '%s'}, $RealPerl, $binmount || '' ) ); + ok($mymount, sprintf(q{Found mountpoint for test file '%s' at '%s'}, $RealTest, $mymount || '')); + ok($binmount, sprintf(q{Found mountpoint for perl executable '%s' at '%s'}, $RealPerl, $binmount || '')); } } diff -Nru libsys-filesystem-perl-1.406/t/04_special.t libsys-filesystem-perl-1.408/t/04_special.t --- libsys-filesystem-perl-1.406/t/04_special.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/04_special.t 2020-09-29 04:31:27.000000000 +0000 @@ -11,7 +11,7 @@ $@ and plan skip_all => "Cannot initialize Sys::Filesystem: $@"; -ok( ref($fs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object' ); +ok(ref($fs) eq 'Sys::Filesystem', 'Create new Sys::Filesystem object'); my @special_filesystems = $fs->special_filesystems(); my @regular_filesystems = $fs->regular_filesystems(); @@ -19,26 +19,26 @@ SKIP: { - skip( 'Badly poor supported OS or no file systems found.', 0 ) unless (@regular_filesystems); - ok( @regular_filesystems, 'Get list of regular filesystems' ); + skip('Badly poor supported OS or no file systems found.', 0) unless (@regular_filesystems); + ok(@regular_filesystems, 'Get list of regular filesystems'); for my $filesystem (@regular_filesystems) { my $special = $fs->special($filesystem) || 0; - ok( !$special, "Regular" ); + ok(!$special, "Regular"); } } SKIP: { - skip( 'Badly poor supported OS or no file systems found.', 0 ) unless (@special_filesystems); - ok( @special_filesystems, 'Get list of regular filesystems' ); + skip('Badly poor supported OS or no file systems found.', 0) unless (@special_filesystems); + ok(@special_filesystems, 'Get list of regular filesystems'); for my $filesystem (@special_filesystems) { my $special = $fs->special($filesystem) || 0; - ok( $special, "Special" ); + ok($special, "Special"); } } diff -Nru libsys-filesystem-perl-1.406/t/05_error.t libsys-filesystem-perl-1.408/t/05_error.t --- libsys-filesystem-perl-1.406/t/05_error.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/05_error.t 2020-09-29 04:31:27.000000000 +0000 @@ -12,12 +12,12 @@ $@ and plan skip_all => "Cannot initialize Sys::Filesystem: $@"; eval { $fs = $fs->new(); }; -like( $@, qr/Class name required/, "No object new" ); +like($@, qr/Class name required/, "No object new"); -eval { $fs = Sys::Filesystem->new( insane => 1 ); }; -like( $@, qr/Unrecognised.*insane.*/, "No insane parameters" ); +eval { $fs = Sys::Filesystem->new(insane => 1); }; +like($@, qr/Unrecognised.*insane.*/, "No insane parameters"); eval { $fs = Sys::Filesystem->new('insane'); }; -like( $@, qr/Odd number of elements passed when even number was expected/, "No odd parameter list" ); +like($@, qr/Odd number of elements passed when even number was expected/, "No odd parameter list"); done_testing(); diff -Nru libsys-filesystem-perl-1.406/t/06_settings.t libsys-filesystem-perl-1.408/t/06_settings.t --- libsys-filesystem-perl-1.406/t/06_settings.t 2014-05-13 13:51:05.000000000 +0000 +++ libsys-filesystem-perl-1.408/t/06_settings.t 2020-09-29 04:31:27.000000000 +0000 @@ -8,7 +8,7 @@ delete @ENV{qw(CANONDEV FSTAB MTAB)}; -my ( $fs, @filesystems ); +my ($fs, @filesystems); eval { $fs = Sys::Filesystem->new(); }; $@ and plan skip_all => "Cannot initialize Sys::Filesystem: $@"; @@ -21,13 +21,13 @@ -l $device and $devsymlinks{$filesystem} = $device; } -$fs = Sys::Filesystem->new( canondev => 1 ); +$fs = Sys::Filesystem->new(canondev => 1); @filesystems = $fs->filesystems; for my $filesystem (@filesystems) { my $device = $fs->device($filesystem); - ok( !-l $device, "$device is not a symlink (canondev => 1)" ); + ok(!-l $device, "$device is not a symlink (canondev => 1)"); } SCOPE: @@ -41,7 +41,7 @@ my $device = $fs->device($filesystem); -l $device and $symdevs{$filesystem} = $device; } - is_deeply( \%symdevs, \%devsymlinks, "\$S::F::CANONDEV = 0 works as expected" ); + is_deeply(\%symdevs, \%devsymlinks, "\$S::F::CANONDEV = 0 works as expected"); } SCOPE: @@ -52,7 +52,7 @@ for my $filesystem (@filesystems) { my $device = $fs->device($filesystem); - ok( !-l $device, "$device is not a symlink (\$S::F::CANONDEV = 1)" ); + ok(!-l $device, "$device is not a symlink (\$S::F::CANONDEV = 1)"); } }