Data::Collector::App - An application implementation for Data::Collector
version 0.15
use Data::Collector::App; my $collector = Data::Collector::App->new_with_options(); $collector->run();
This module integrates all the checks and logics of an application.
It supports getopt command line parsing and optional configuration files.
Using this implementation, one can write an application.
An optional configuration file. If it exists, it is read and used for the value of the rest of these attributes (if they are present in the file).
Default: /etc/data_collector.yaml.
/etc/data_collector.yaml
Type of engine (OpenSSH, for example).
Any additional arguments the engine might want.
Type of serialization (JSON or YAML, for example).
JSON
YAML
Any additional arguments the serializer might want.
Any additional arguments the Info module might want.
You generally don't want to play with it, trust me.
A file to output to. If one is not provided, it will output the serialized result to stdout.
Creates a new instance of the application interface. This is the clean way of doing it. You would probably prefer new_with_options described below.
new_with_options
The same as new, only it parses command line arguments and takes care of reading a configuration file (if the correct argument for it is provided).
new
Runs the application: starts a new collector, collects the informtion and - depending on the options - either outputs the result to the screen or to a file.
Subroutine run after initialization. Used to create the info_args attribute for the main Data::Collector.
info_args
Data::Collector
Sawyer X <xsawyerx@cpan.org>
This software is copyright (c) 2012 by Sawyer X.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Collector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Collector
CPAN shell
perl -MCPAN -e shell install Data::Collector
For more information on module installation, please visit the detailed CPAN module installation guide.