1 package System::Introspector::Report::Builder::Perls;
4 extends 'System::Introspector::Report::Builder';
6 has skip_errors => (is => 'ro', default => sub { 1 });
8 has _rows => (is => 'ro', default => sub { [] });
18 my ($self, $id, $data) = @_;
19 my $perls = $data->{perls}{perls} || {};
20 my $hostname = $data->{host}{hostname};
21 if (my @perl_keys = sort keys %$perls) {
22 for my $perl_key (@perl_keys) {
23 my $perl = $perls->{$perl_key};
24 next if defined($perl->{__error__}) and $self->skip_errors;
25 push @{$self->_rows}, {
26 hostname => $hostname,
28 location => $perl->{executable},
29 version => $perl->{config}{version},
30 defined($perl->{__error__})
31 ? (__error__ => $perl->{__error__})
37 push @{$self->_rows}, {
38 hostname => $hostname,
48 title => 'Perl Installations',
51 { key => 'remote', label => 'Remote' },
52 { key => 'hostname', label => 'Hostname' },
53 { key => 'location', label => 'Location' },
54 { key => 'version', label => 'Version' },