=head1 SYNOPSIS
- use Linux::SysInfo qw/sysinfo/;
+ use Linux::SysInfo qw<sysinfo>;
my $si = sysinfo;
print "$_: $si->{$_}\n" for keys %$si;
=cut
-use base qw/Exporter/;
+use base qw<Exporter>;
our @EXPORT = ();
our %EXPORT_TAGS = (
- 'funcs' => [ qw/sysinfo/ ],
- 'consts' => [ qw/LS_HAS_EXTENDED/ ]
+ 'funcs' => [ qw<sysinfo> ],
+ 'consts' => [ qw<LS_HAS_EXTENDED> ]
);
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
use strict;
use warnings;
-use lib qw{blib/lib blib/arch};
+use lib qw<blib/lib blib/arch>;
-use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/;
+use Linux::SysInfo qw<sysinfo LS_HAS_EXTENDED>;
my $si = sysinfo;
die 'sysinfo() failed ! (should be pretty rare but it did happen)' unless $si;
($si->{mem_unit} == 1) ? "the memory values are the actual sizes in bytes :\n"
: "the sizes in bytes are actually :\n";
print '- ', $_, ': ', $si->{$_} * $si->{mem_unit}, "\n" for sort
- qw/totalram freeram sharedram bufferram totalswap freeswap totalhigh freehigh/;
+ qw<totalram freeram sharedram bufferram totalswap freeswap totalhigh freehigh>;
}
use Test::More tests => 12 * 5;
-use Linux::SysInfo qw/sysinfo/;
+use Linux::SysInfo qw<sysinfo>;
SKIP: {
for my $run (0 .. 4) {
unless defined $si;
is ref($si), 'HASH', "sysinfo returns a hash reference at run $run";
- for (qw/uptime load1 load5 load15 procs
- totalram freeram sharedram bufferram totalswap freeswap/) {
+ for (qw<uptime load1 load5 load15 procs
+ totalram freeram sharedram bufferram totalswap freeswap>) {
if (defined $si->{$_}) {
like $si->{$_}, qr/^\d+(?:\.\d+)?$/,
"key $_ looks like a number at run $run";
use Test::More;
-use Linux::SysInfo qw/sysinfo LS_HAS_EXTENDED/;
+use Linux::SysInfo qw<sysinfo LS_HAS_EXTENDED>;
unless (LS_HAS_EXTENDED) {
plan skip_all => 'your kernel does not support extended sysinfo fields';
is ref($si), 'HASH', "sysinfo returns a hash reference at run $run";
is scalar(keys %$si), 14, "sysinfo object has the right number of keys at run $run";
- for (qw/totalhigh freehigh mem_unit/) {
+ for (qw<totalhigh freehigh mem_unit>) {
if (defined $si->{$_}) {
like $si->{$_}, qr/^\d+(?:\.\d+)?$/,
"key $_ looks like a number at run $run";
use strict;
use warnings;
-use Config qw/%Config/;
+use Config qw<%Config>;
BEGIN {
my $has_threads = do {
}
}
-use Linux::SysInfo qw/sysinfo/;
+use Linux::SysInfo qw<sysinfo>;
sub try {
my $tid = threads->tid();