Commit | Line | Data |
90d22dbe |
1 | #!/usr/bin/env perl |
2 | use strictures 1; |
3 | use lib qw( lib ); |
4 | use Data::Dump qw( pp ); |
5 | use Module::Runtime qw( use_module ); |
2f3044c6 |
6 | use Getopt::Long; |
7 | use Data::YAML::Writer; |
8 | |
9 | GetOptions( |
10 | 'yaml' => \(my $opt_yaml), |
11 | ); |
90d22dbe |
12 | |
13 | my $intro = shift(@ARGV) |
14 | or die "Probe argument required\n"; |
15 | |
2f3044c6 |
16 | my $data = use_module("System::Introspector::$intro")->new(@ARGV)->gather; |
17 | if ($opt_yaml) { |
18 | my $writer = Data::YAML::Writer->new; |
19 | my $output = ''; |
20 | $writer->write($data, \$output); |
21 | print $output; |
22 | } |
23 | else { |
24 | pp $data; |
25 | } |