Config-Model-Backend-Augeas

 view release on metacpan or  search on metacpan

lib/Config/Model/Backend/Augeas.pm  view on Meta::CPAN


        # Depending on the syntax, list can be in the form:
        # /files/etc/ssh/sshd_config/AcceptEnv[2]/3/   non-seq  ditch idx
        # /files/etc/hosts/4/                          non-seq
        # /files/etc/ssh/sshd_config/HostKey[2]         is-seq  keep idx

        # Likewise, hashes can be in the form
        # /files/etc/ssh/sshd_config/Subsystem[2]/foo/    is-seq ditch idx
        # /files/etc/ssh/sshd_config/Bar/foo/            non-seq

        my @cm_steps = split m!/+!, $cm_p;
        my $obj = $self->{node};
        $obj = $obj->fetch_element( shift @cm_steps ) if $set_in;

        while ( my $step = shift @cm_steps ) {
            my ( $label, $idx ) = ( $step =~ /(\w+)(?:\[(\d+)\])?/ );
            my $is_seq = $is_seq_lens{$label} || 0;
            $logger->debug( "read-augeas: step label $label "
                    . ( defined $idx ? "idx $idx " : '' )
                    . "(is_seq $is_seq)" );



( run in 0.964 second using v1.01-cache-2.11-cpan-71847e10f99 )