11 Jul 2012 15:25:46 UTC
- Distribution: Parse-cfggen
- Module version: 0.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (380 / 0 / 0)
- KwaliteeBus factor: 0
- 9.45% Coverage
- License: perl_5
- Activity24 month
- Download (4.04KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionKUMY Mathieu Alorent
- LICENSE AND COPYRIGHT
Parse::cfggen - Parse the output of cfggen utility.
Parse::cfggen parses the output of
cfggenutility to allow programmatic access to the RAID configuration information provided by the cfggen utility on LSI RAID cards.
use Parse::cfggen; my $cfggen = Parse::cfggen->new();
cfggentool directly to query the hardware (requires root):
my $controllers = $cfggen->parse_config();
Parse a text file created already by running
my $controllers = $cfggen->parse_config_file("foo.txt");
Read from a file descriptor already opened by the program:
my $controllers = $cfggen->parse_config_fh(\*STDIN);
Return an instance of the Parse::cfggen class that can be used to parse input in one of several ways.
Attempt to run the cfggen utility, and parse the output. This command actually uses parse_config_fh() after opening a pipe to the relevant command.
The commands that are actually run are approximately:
cfggen LIST cfggen 0 DISPLAY cfggen 1 DISPLAY cfggen ... DISPLAY
This command requires root access, and Parse::cfggen makes no attempt to use sudo or any other method to gain root access. It is recommended to call your script which uses this module as root.
The parse_config_fh() and parse_config_file() will expect output equivalent to that from the above command.
Open and parse a file containing the output from cfggen.
Read from the file handle and parse it, returning a hash-of-hashes.
<kumy at cpan.org>
Please report any bugs or feature requests to
bug-parse-cfggen at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-cfggen. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
Copyright 2012 Mathieu Alorent.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
This program is based on Parse::HP::ACU a work of Jeremy Cole.
Module Install Instructions
To install Parse::cfggen, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Parse::cfggen
For more information on module installation, please visit the detailed CPAN module installation guide.