The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ncustom - command line interface to NCustom

SYNOPSIS

ncustom [{-i|--initialise}]

        [{-n|--ncustom} ncustom_filename/url ]

        [{-u|--undo}    transaction_dirname  ]

        [{-b|--blat}]

        [{-c|--config}  name=value  ]

Options: --initialise purges the transaction archive

        --undo          undoes the transactions specified

        --ncustom       fetch and execute the ncustom scripts specified

        --blat          blat personal configuration with global configuration

        --config        edit settings in personal configuration file

ABSTRACT

A command line interface to the NCustom module. Currently invocation of only the simplest NCustom methods is supported, namely initialising the transaction archive, undoing transactions, and executing new NCustom scripts.

DESCRIPTION

OPTIONS

    -i, --initialise

    Initialises (purges) the transaction archive. The transactions will no longer be able to be undone.

    -u,--undo

      $eg = <<'  end_eg';
      
      grep -c incomplete ~/file1 >> ~/log 
    
      ncustom -n test5.ncus ;
      grep -c incomplete ~/file1 >> ~/log
    
      ncustom -n test6.ncus ;
      grep -c incomplete ~/file1 >> ~/log
    
      ncustom -u test6.ncus ;
      grep -c incomplete ~/file1 >> ~/log 
      
      cat ~/log # 7,3,1,3
    
      end_eg

    Undo is followed by one or more transaction names, transaction names are sub-directoy names within the transaction archive directory. There is a sub-directoy "all" that contains the entire journal of transactions since the last initialise. Transaction names are created when using the NCusom module in NCustom scripts. They are generaly named after the basename of the NCustom script, and generaly the is a one to one relationship, but the NCustom script may override these behaviours.

    -n,--ncustom

      $eg = <<'  end_eg';
      
      # default_dir contains test2.ncus 
      # default_url contains test3.ncus 
      
      ncustom -n ~/dir20/test1.ncus -n test2.ncus ;
      ncustom -n test3.ncus -n http://install/install/NCustom/test4.ncus ;
      
      end_eg

    Ncustom is followed by one or more filenames, either local filenames or URLs. The filenames are assumed to be NCustom scripts, are fetched, and executed. If the filename is not an NCustom script, then transactions will not be journalled, and will not be able to be undone. An unqualified NCustom script name will be searched for in the loaction(s) specified in NCustom::Config. Settings in NCustom::Config may be overridden using ~/.ncustom/NCustom/MyConfig.pm.

    -b, --blat

    Blat overwrites the personal configuration profile with the global conf iguration profile. The personal configuration profile is "~/.ncustom/NCustom/MyConfig.pm".

    -c,--config

      $eg2 = <<'  end_eg';
    
      # modify existing values
      ncustom -c src_fqdn=\"install.baneharbinger.com\" ;
      ncustom -c test_url1=\"install.baneharbinger.com/index.html\" ;
    
      # add new values
      ncustom -c my_number=5 -c my_text=\"blah\" ;
    
      # add new complex (eg hash) values
      ncustom -c my_hosts='{ mew => "192.168.0.10", pikachu => "192.168.0.20" }' ;
    
      end_eg

    Config is followed by name vaule pairs. If there is a corresponding name in the personal configuration file, then its vaule shall be updated. If there is no corresponding name then the name value shall be added to the end of the file. If there is no file it shall be created. The personal configuration file is "~/.ncustom/NCustom/MyConfig.pm".

    If some configuration vlaues are defined in terms of other configuration values, then the order may be important.

    The current implementation is simplistic and erroneous in all but the simplest cases (eg the pre-existing name value assignment is only a one liner).

SEE ALSO

NCustom NCustom::Config ncustom

http://baneharbinger.com/NCustom

AUTHOR

Bane Harbinger, <bane@baneharbinger.com>

COPYRIGHT AND LICENSE

Copyright 2003 by Bane Harbinger

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 46:

You can't have =items (as at line 164) unless the first thing after the =over is an =item