1 package System::Introspector::Puppet;
6 default => sub { '/var/lib/puppet/state/classes.txt' },
9 has resources_file => (
11 default => sub { '/var/lib/puppet/state/resources.txt' },
17 classes => $self->_gather_classes,
18 resources => $self->_gather_resources,
22 sub _gather_resources {
24 my $file = $self->resources_file;
25 open my $fh, '<', $file
26 or return { error => "Unable to read $file: $!" };
38 my $file = $self->classes_file;
39 open my $fh, '<', $file
40 or return { error => "Unable to read $file: $!" };
52 System::Introspector::Puppet - Gather puppet agent information
56 Reads the C<classes.txt> and C<resources.txt> provided by puppet.
62 The path to the C<classes.txt> puppet file.
63 Defaults to C</var/lib/puppet/state/classes.txt>.
67 The path to the C<resources.txt> puppet file.
68 Defaults to C</var/lib/puppet/state/resources.txt>.
74 =item L<System::Introspector>