5 use System::Introspector::Report::Source;
6 use System::Introspector::Report::Config;
9 's|storage=s' => \my $storage_dir,
10 'c|config=s' => \my $config_file,
11 'r|report=s' => \my @report_types,
12 'p|publish=s' => \my @publish_types,
13 'a|all' => \my $all_reports,
14 'h|help' => sub { pod2usage(0) },
17 die "$0 requires --storage (-s) to be specified\n"
18 unless defined $storage_dir;
20 die "$0 requires --config (-c) to be specified\n"
21 unless defined $storage_dir;
23 my $config = System::Introspector::Report::Config
24 ->new(config_file => $config_file);
26 my $source = System::Introspector::Report::Source
27 ->new_from_root($storage_dir);
29 my @types = $all_reports
30 ? $config->report_types
31 : map [$_, {}], @report_types;
32 my @reports = $source->generate(@types);
34 for my $publisher ($config->publishers(@publish_types)) {
35 $publisher->publish(\@reports);
42 system-introspector-report - Generate System::Introspector reports