Intrepid has asked for the wisdom of the Perl Monks concerning the following question:
I'm getting an unexpected result from an attempt to use a module, Filesys::DfPortable, on CPAN. I'm seeing the same results in blocks, with different filesystems used as arguments to dfportable. The output of my code looks like this:
$ perl ~/Documents/perl-libdirs-installTime.pl /usr/lib/perl5/5.40/x86_64-cygwin-threads installarchlib Total 1k blocks used in installarchlib: 175,087,368 /usr/share/perl5/5.40 installprivlib Total 1k blocks used in installprivlib: 175,087,368
So here's the code I'd like help with:
#!/usr/bin/env perl # use strict; use warnings; use Config; use Number::Format qw(:subs); use Filesys::DfPortable; my $mlen = 0; my %hop; my @lodirs = qw(installarchlib installprivlib); for (@lodirs) { my $p = $Config{ $_ }; $mlen = length( $p ) > $mlen ? length( $p ) : $mlen; $hop{ $_ } = $p; } $mlen += 2; for (sort keys( %hop )) { printf( "%-${mlen}s%s\n", $hop{ $_ }, $_ ); my $mea = dfportable( $hop{ $_ }, 1024 ); printf "Total 1k blocks used in %s: %s\n", $_ , format_number( $mea->{bused} ); }
I started working on this little script in Linux and I see the same anomalous results on CygPerl. I don't think it's a PEBKAC but I need other eyes to check it out. Thanks very much, Monks / Nuns.
– Soren
Apr 10, 2026 at 15:34 UTC
A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: An anomaly with Filesys::DfPortable, I need your eyes
by dave_the_m (Monsignor) on Mar 09, 2026 at 22:51 UTC | |
by Fletch (Bishop) on Mar 10, 2026 at 05:30 UTC | |
by Intrepid (Curate) on Mar 10, 2026 at 16:26 UTC | |
by afoken (Chancellor) on Mar 10, 2026 at 09:18 UTC | |
by Intrepid (Curate) on Mar 12, 2026 at 19:49 UTC | |
by afoken (Chancellor) on Apr 01, 2026 at 23:01 UTC | |
|
Re: An anomaly with Filesys::DfPortable, I need your eyes
by Intrepid (Curate) on Mar 13, 2026 at 19:29 UTC |