Interesting, I'm not sure if that module has the same lineage as Filesys::Df, but for many years I have had reliable operations with the following:
use Filesys::Df; for my $filesys ( qw { / /usr /opt /sybase /spooltmp /var /home } ) { my $df = df( $filesys ); next if $df->{used} < 0 or 0 == $df->{user_blocks}; push @df, [ $filesys, $df->{used} / $df->{user_blocks}, $df->{bava +il}*1024 ]; }
The < 0 was a work-around for some crappy Solaris NFS code that used to return negative numbers on large (>2GB) NFS mounts, it's probably no longer needed.
I just checked on CPAN: both modules are fairly old (which doesn't mean anything negative!) although Filesys::Df was updated more recently.
Personally, I'm quite happy with the procedural approach in this case, I don't think that the OO approach is a win here.
In reply to Re: Filesys::DiskFree (or Filesys::Df)
by grinder
in thread Problems using Filesys::DiskFree
by Ronnie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |