Device-Network-ConfigParser

 view release on metacpan or  search on metacpan

lib/Device/Network/ConfigParser.pm  view on Meta::CPAN

package Device::Network::ConfigParser;
# ABSTRACT: A harness for parsing network device configuration.
our $VERSION = '0.006'; # VERSION


use 5.006;
use strict;
use warnings;
use Modern::Perl;
use Getopt::Long;
use Pod::Usage;
use Perl6::Slurp;
use Module::Load;
use Data::Dumper;
use JSON;
use Scalar::Util qw{reftype};


use Exporter qw{import};

our @EXPORT_OK = qw{app};

=head1 NAME

Device::Network::ConfigParser - harness for parsing network configurations.

=head1 VERSION

version 0.006

=head1 SYNOPSIS

Device::Network::ConfigParser is a harness for parsing network device configuration. It exports a single subroutine - C<app()> - which takes command line arguments and runs the harness. This module is used by the C<ncp> command line utility. For info...

The harness supports specific parsing modules by:

=over 4

=item * Dynamically loading a specific parsing module based on command line arguments.

=item * Slurping in the device configuration from STDIN or from a number of files.

=item * Opening the required output filehandles.

=back

=head1 CURRENT PARSER MODULES

=over 4

=item L<Device::Network::ConfigParser::Cisco::ASA>

=item L<Device::Network::ConfigParser::CheckPoint::Gaia>

=item L<Device::Network::ConfigParser::Linux::NetUtils>

=item L<Device::Network::ConfigParser::Linux::iproute2>

=back

=head1 DEVELOPING MODULES

Parsing modules exist within the C<Device::Network::ConfigParser::> namespace. For a I<vendor> and I<type> of device, the module is defined as C<Device::Network::ConfigParser::vendor::type>.

The harness takes care of parsing the command line arguments, opening files (or STDIN/STDOUT) and slurping in their contents. It calls specified subroutines exported by the specified parsing module. All modules must export the following subroutines:

=head2 get_parser

    my $module_parser = get_parser();

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 4.072 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )