From: Robert 'phaylon' Sedlacek Date: Thu, 24 May 2012 17:47:38 +0000 (+0000) Subject: moved probe classes to ::Probe:: namespace X-Git-Tag: v0.001_001~62 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=afd7c030950d8b1b04c659d8a9cff186112a23c4;p=scpubgit%2FSystem-Introspector.git moved probe classes to ::Probe:: namespace --- diff --git a/lib/System/Introspector/DiskUsage.pm b/lib/System/Introspector/Probe/DiskUsage.pm similarity index 95% rename from lib/System/Introspector/DiskUsage.pm rename to lib/System/Introspector/Probe/DiskUsage.pm index b2d1d9e..0f210c4 100644 --- a/lib/System/Introspector/DiskUsage.pm +++ b/lib/System/Introspector/Probe/DiskUsage.pm @@ -1,4 +1,4 @@ -package System::Introspector::DiskUsage; +package System::Introspector::Probe::DiskUsage; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/FileHandles.pm b/lib/System/Introspector/Probe/FileHandles.pm similarity index 94% rename from lib/System/Introspector/FileHandles.pm rename to lib/System/Introspector/Probe/FileHandles.pm index e729ff5..8c26e07 100644 --- a/lib/System/Introspector/FileHandles.pm +++ b/lib/System/Introspector/Probe/FileHandles.pm @@ -1,4 +1,4 @@ -package System::Introspector::FileHandles; +package System::Introspector::Probe::FileHandles; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Groups.pm b/lib/System/Introspector/Probe/Groups.pm similarity index 95% rename from lib/System/Introspector/Groups.pm rename to lib/System/Introspector/Probe/Groups.pm index db6e358..aa205ae 100644 --- a/lib/System/Introspector/Groups.pm +++ b/lib/System/Introspector/Probe/Groups.pm @@ -1,4 +1,4 @@ -package System::Introspector::Groups; +package System::Introspector::Probe::Groups; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Host.pm b/lib/System/Introspector/Probe/Host.pm similarity index 96% rename from lib/System/Introspector/Host.pm rename to lib/System/Introspector/Probe/Host.pm index 6fd49ca..4330c2d 100644 --- a/lib/System/Introspector/Host.pm +++ b/lib/System/Introspector/Probe/Host.pm @@ -1,4 +1,4 @@ -package System::Introspector::Host; +package System::Introspector::Probe::Host; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Hosts.pm b/lib/System/Introspector/Probe/Hosts.pm similarity index 95% rename from lib/System/Introspector/Hosts.pm rename to lib/System/Introspector/Probe/Hosts.pm index 5f01f37..d1a0d8b 100644 --- a/lib/System/Introspector/Hosts.pm +++ b/lib/System/Introspector/Probe/Hosts.pm @@ -1,4 +1,4 @@ -package System::Introspector::Hosts; +package System::Introspector::Probe::Hosts; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/LibDirs/Perl.pm b/lib/System/Introspector/Probe/LibDirs/Perl.pm similarity index 97% rename from lib/System/Introspector/LibDirs/Perl.pm rename to lib/System/Introspector/Probe/LibDirs/Perl.pm index 2d71d0b..1e34ba9 100644 --- a/lib/System/Introspector/LibDirs/Perl.pm +++ b/lib/System/Introspector/Probe/LibDirs/Perl.pm @@ -1,4 +1,4 @@ -package System::Introspector::LibDirs::Perl; +package System::Introspector::Probe::LibDirs::Perl; use Moo; use Module::Metadata; use Digest::SHA; diff --git a/lib/System/Introspector/MountPoints.pm b/lib/System/Introspector/Probe/MountPoints.pm similarity index 97% rename from lib/System/Introspector/MountPoints.pm rename to lib/System/Introspector/Probe/MountPoints.pm index 325f961..ae07947 100644 --- a/lib/System/Introspector/MountPoints.pm +++ b/lib/System/Introspector/Probe/MountPoints.pm @@ -1,4 +1,4 @@ -package System::Introspector::MountPoints; +package System::Introspector::Probe::MountPoints; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Nagios/CheckMkAgent.pm b/lib/System/Introspector/Probe/Nagios/CheckMkAgent.pm similarity index 94% rename from lib/System/Introspector/Nagios/CheckMkAgent.pm rename to lib/System/Introspector/Probe/Nagios/CheckMkAgent.pm index 5362457..310b91b 100644 --- a/lib/System/Introspector/Nagios/CheckMkAgent.pm +++ b/lib/System/Introspector/Probe/Nagios/CheckMkAgent.pm @@ -1,4 +1,4 @@ -package System::Introspector::Nagios::CheckMkAgent; +package System::Introspector::Probe::Nagios::CheckMkAgent; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Packages/Apt.pm b/lib/System/Introspector/Probe/Packages/Apt.pm similarity index 94% rename from lib/System/Introspector/Packages/Apt.pm rename to lib/System/Introspector/Probe/Packages/Apt.pm index 6b742d5..3dee62b 100644 --- a/lib/System/Introspector/Packages/Apt.pm +++ b/lib/System/Introspector/Probe/Packages/Apt.pm @@ -1,4 +1,4 @@ -package System::Introspector::Packages::Apt; +package System::Introspector::Probe::Packages::Apt; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Processes.pm b/lib/System/Introspector/Probe/Processes.pm similarity index 97% rename from lib/System/Introspector/Processes.pm rename to lib/System/Introspector/Probe/Processes.pm index 4344488..3d1b962 100644 --- a/lib/System/Introspector/Processes.pm +++ b/lib/System/Introspector/Probe/Processes.pm @@ -1,4 +1,4 @@ -package System::Introspector::Processes; +package System::Introspector::Probe::Processes; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Puppet.pm b/lib/System/Introspector/Probe/Puppet.pm similarity index 97% rename from lib/System/Introspector/Puppet.pm rename to lib/System/Introspector/Probe/Puppet.pm index a764b30..fda3225 100644 --- a/lib/System/Introspector/Puppet.pm +++ b/lib/System/Introspector/Probe/Puppet.pm @@ -1,4 +1,4 @@ -package System::Introspector::Puppet; +package System::Introspector::Probe::Puppet; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Repositories/Git.pm b/lib/System/Introspector/Probe/Repositories/Git.pm similarity index 98% rename from lib/System/Introspector/Repositories/Git.pm rename to lib/System/Introspector/Probe/Repositories/Git.pm index e93fe62..38e39b9 100644 --- a/lib/System/Introspector/Repositories/Git.pm +++ b/lib/System/Introspector/Probe/Repositories/Git.pm @@ -1,4 +1,4 @@ -package System::Introspector::Repositories::Git; +package System::Introspector::Probe::Repositories::Git; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/ResolvConf.pm b/lib/System/Introspector/Probe/ResolvConf.pm similarity index 95% rename from lib/System/Introspector/ResolvConf.pm rename to lib/System/Introspector/Probe/ResolvConf.pm index 7794d4e..3417496 100644 --- a/lib/System/Introspector/ResolvConf.pm +++ b/lib/System/Introspector/Probe/ResolvConf.pm @@ -1,4 +1,4 @@ -package System::Introspector::ResolvConf; +package System::Introspector::Probe::ResolvConf; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Sudoers.pm b/lib/System/Introspector/Probe/Sudoers.pm similarity index 97% rename from lib/System/Introspector/Sudoers.pm rename to lib/System/Introspector/Probe/Sudoers.pm index 1351029..0850752 100644 --- a/lib/System/Introspector/Sudoers.pm +++ b/lib/System/Introspector/Probe/Sudoers.pm @@ -1,4 +1,4 @@ -package System::Introspector::Sudoers; +package System::Introspector::Probe::Sudoers; use Moo; use System::Introspector::Util qw( diff --git a/lib/System/Introspector/Users.pm b/lib/System/Introspector/Probe/Users.pm similarity index 98% rename from lib/System/Introspector/Users.pm rename to lib/System/Introspector/Probe/Users.pm index 7db2e8a..7189a41 100644 --- a/lib/System/Introspector/Users.pm +++ b/lib/System/Introspector/Probe/Users.pm @@ -1,4 +1,4 @@ -package System::Introspector::Users; +package System::Introspector::Probe::Users; use Moo; use System::Introspector::Util qw( diff --git a/t/diskusage.t b/t/diskusage.t index aa8b27f..d6fb426 100644 --- a/t/diskusage.t +++ b/t/diskusage.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::DiskUsage; +use System::Introspector::Probe::DiskUsage; -my $probe = System::Introspector::DiskUsage->new; +my $probe = System::Introspector::Probe::DiskUsage->new; my $result = $probe->gather; ok $result, 'received data'; diff --git a/t/filehandles.t b/t/filehandles.t index 015b31f..f740318 100644 --- a/t/filehandles.t +++ b/t/filehandles.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::FileHandles; +use System::Introspector::Probe::FileHandles; -my $probe = System::Introspector::FileHandles->new; +my $probe = System::Introspector::Probe::FileHandles->new; my $data = $probe->gather; ok($data, 'received result'); diff --git a/t/groups.t b/t/groups.t index cacae50..dc28ec2 100644 --- a/t/groups.t +++ b/t/groups.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::Groups; +use System::Introspector::Probe::Groups; -my $probe = System::Introspector::Groups->new; +my $probe = System::Introspector::Probe::Groups->new; my $result = $probe->gather; ok $result, 'received data'; diff --git a/t/host.t b/t/host.t index 1bfaa1a..4e64d9e 100644 --- a/t/host.t +++ b/t/host.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::Host; +use System::Introspector::Probe::Host; -my $probe = System::Introspector::Host->new; +my $probe = System::Introspector::Probe::Host->new; my $data = $probe->gather; ok length($data->{hostname}), 'found a hostname'; diff --git a/t/hosts.t b/t/hosts.t index 323dcde..65822bb 100644 --- a/t/hosts.t +++ b/t/hosts.t @@ -2,9 +2,9 @@ use strictures 1; use Test::More; use FindBin; -use System::Introspector::Hosts; +use System::Introspector::Probe::Hosts; -my $probe = System::Introspector::Hosts->new( +my $probe = System::Introspector::Probe::Hosts->new( hosts_file => "$FindBin::Bin/data/hosts", ); diff --git a/t/libdirs-perl.t b/t/libdirs-perl.t index be60cdb..4e7ef2c 100644 --- a/t/libdirs-perl.t +++ b/t/libdirs-perl.t @@ -2,18 +2,18 @@ use strictures 1; use Test::More; use FindBin; -use System::Introspector::LibDirs::Perl; +use System::Introspector::Probe::LibDirs::Perl; my $dir = "$FindBin::Bin/data/libdir/perl"; no warnings 'redefine'; -*System::Introspector::LibDirs::Perl::_open_locate_libdirs_pipe = sub { +*System::Introspector::Probe::LibDirs::Perl::_open_locate_libdirs_pipe = sub { my $output = "$dir/lib/perl5\n"; open my $fh, '<', \$output; return $fh; }; -my $probe = System::Introspector::LibDirs::Perl->new( +my $probe = System::Introspector::Probe::LibDirs::Perl->new( root => $dir, ); my $data = $probe->gather; diff --git a/t/mountpoints.t b/t/mountpoints.t index 8f8e5b7..e3f8859 100644 --- a/t/mountpoints.t +++ b/t/mountpoints.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::MountPoints; +use System::Introspector::Probe::MountPoints; -my $probe = System::Introspector::MountPoints->new; +my $probe = System::Introspector::Probe::MountPoints->new; my $data = $probe->gather; ok $data->{fstab}, 'received fstab data'; diff --git a/t/nagios-checkmkagent.t b/t/nagios-checkmkagent.t index 2fee140..77a7412 100644 --- a/t/nagios-checkmkagent.t +++ b/t/nagios-checkmkagent.t @@ -1,10 +1,10 @@ use strictures 1; use Test::More; -use System::Introspector::Nagios::CheckMkAgent; +use System::Introspector::Probe::Nagios::CheckMkAgent; no warnings 'redefine'; -*System::Introspector::Nagios::CheckMkAgent::_get_check_mk_agent_output = sub { +*System::Introspector::Probe::Nagios::CheckMkAgent::_get_check_mk_agent_output = sub { return map "$_\n", '<<>>', 'bar', @@ -14,7 +14,7 @@ no warnings 'redefine'; 'qux'; }; -my $probe = System::Introspector::Nagios::CheckMkAgent->new; +my $probe = System::Introspector::Probe::Nagios::CheckMkAgent->new; my $data = $probe->gather; is_deeply $data, diff --git a/t/packages-apt.t b/t/packages-apt.t index f96d685..c9c1300 100644 --- a/t/packages-apt.t +++ b/t/packages-apt.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::Packages::Apt; +use System::Introspector::Probe::Packages::Apt; -my $probe = System::Introspector::Packages::Apt->new; +my $probe = System::Introspector::Probe::Packages::Apt->new; my $data = $probe->gather; ok(scalar(keys %$data), 'received packages'); diff --git a/t/processes.t b/t/processes.t index 8e0ca15..7a41910 100644 --- a/t/processes.t +++ b/t/processes.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::Processes; +use System::Introspector::Probe::Processes; -my $probe = System::Introspector::Processes->new; +my $probe = System::Introspector::Probe::Processes->new; my $result = $probe->gather; ok($result, 'got result'); diff --git a/t/puppet.t b/t/puppet.t index 3a56c55..c7e396b 100644 --- a/t/puppet.t +++ b/t/puppet.t @@ -2,9 +2,9 @@ use strictures 1; use Test::More; use FindBin; -use System::Introspector::Puppet; +use System::Introspector::Probe::Puppet; -my $probe = System::Introspector::Puppet->new( +my $probe = System::Introspector::Probe::Puppet->new( classes_file => "$FindBin::Bin/data/puppet/classes.txt", resources_file => "$FindBin::Bin/data/puppet/resources.txt", ); diff --git a/t/repositories-git.t b/t/repositories-git.t index 93967bc..008224d 100644 --- a/t/repositories-git.t +++ b/t/repositories-git.t @@ -2,7 +2,7 @@ use strictures 1; use Test::More; use File::Temp qw( tempdir ); -use System::Introspector::Repositories::Git; +use System::Introspector::Probe::Repositories::Git; plan skip_all => q{Tests require a git executable} unless `which git`; @@ -10,7 +10,7 @@ plan skip_all => q{Tests require a git executable} my $dir = tempdir(CLEANUP => 1); no warnings 'redefine'; -*System::Introspector::Repositories::Git::_open_locate_git_config_pipe = sub { +*System::Introspector::Probe::Repositories::Git::_open_locate_git_config_pipe = sub { my $output = "$dir/.git/config\n"; open my $fh, '<', \$output; return $fh; @@ -18,7 +18,7 @@ no warnings 'redefine'; system("GIT_DIR=$dir/.git git init > /dev/null"); -my $probe = System::Introspector::Repositories::Git->new( +my $probe = System::Introspector::Probe::Repositories::Git->new( root => "$dir", ); diff --git a/t/resolvconf.t b/t/resolvconf.t index 4d927f0..1341e33 100644 --- a/t/resolvconf.t +++ b/t/resolvconf.t @@ -2,9 +2,9 @@ use strictures 1; use Test::More; use FindBin; -use System::Introspector::ResolvConf; +use System::Introspector::Probe::ResolvConf; -my $probe = System::Introspector::ResolvConf->new( +my $probe = System::Introspector::Probe::ResolvConf->new( resolv_conf_file => "$FindBin::Bin/data/resolv.conf", ); my $result = $probe->gather; diff --git a/t/sudoers.t b/t/sudoers.t index 8420e07..d230980 100644 --- a/t/sudoers.t +++ b/t/sudoers.t @@ -2,7 +2,7 @@ use strictures 1; use Test::More; use FindBin; -use System::Introspector::Sudoers; +use System::Introspector::Probe::Sudoers; my $dir = "$FindBin::Bin/sudoers-data"; @@ -23,7 +23,7 @@ my $bar_file = write_file("bar_host/baz", 'in bar file', ); -my $probe = System::Introspector::Sudoers->new( +my $probe = System::Introspector::Probe::Sudoers->new( sudoers_file => $start, hostname => 'host', ); diff --git a/t/users.t b/t/users.t index 707e9c6..101affd 100644 --- a/t/users.t +++ b/t/users.t @@ -1,9 +1,9 @@ use strictures 1; use Test::More; -use System::Introspector::Users; +use System::Introspector::Probe::Users; -my $probe = System::Introspector::Users->new; +my $probe = System::Introspector::Probe::Users->new; my $data = $probe->gather; ok((my $user = $data->{users}{ +getlogin }), 'found own user');