CBI-Wrapper

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

Get the current CBI::Wrapper::Flow object.

## append\_disposal($disposal)

Append the [disposal hashref](#disposal_hashref) passed as param to the current
disposals.

# FLOW CREATION

## create\_flow()

Create a new flow from the current header and disposals.
If the current header or disposals are undefined, return 0.
You can set a new current header and disposals calling this
method with params like this:

        $cbi->create_flow({header => $header, 
                           disposals => $disposals, 
                           flow_type => $flow_type
        });

# PRINTING AND LOADING FILES

## print($filename)

Prints the current CBI::Wrapper::Flow object to a file
with the filename passed as param.
The current CBI::Wrapper::Flow object is defined when

- ["create\_flow()"](#create_flow) is called;
- a CBI::Wrapper::Flow is passed with ["set\_flow\_CBI($CBI\_flow)"](#set_flow_cbi-cbi_flow);
- a file is [loaded](#load-filename).

## load($filename)

Load a file with the filename passed as param.
This will set a new current CBI::Wrapper::Flow object
with the file content.
This will **NOT** set the current header and disposals.

# OTHER CBI FLOWS

You can configure other flows (es. MAV) editing CBI::Wrapper/RecordMapping.pm
In that file every disposal config is like this:

        my $IB = [
                {from => 1, to => 1, name => 'filler1', type => 'an', truncate =>  'no'},
        ];
        

where

- from is the starting column
- to is the ending column
- type is the field data type (n = numeric, an = string)
- truncate denotes if the string content will be truncated automatically (if length > field length)
or if an error will be thrown.

# ONLINE RESOURCES

- Official documentation [https://www.cbi-org.eu/My-Menu/Servizio-CBI-Documentazione/Servizio-CBI-Documentazione-Standard](https://www.cbi-org.eu/My-Menu/Servizio-CBI-Documentazione/Servizio-CBI-Documentazione-Standard)
(Registration required)

# ACKNOWLEDGEMENTS

Lorenzo Battistini - Author of the Python module from which this code is derived.

# AUTHOR

Samuele Bonino <samuele.bonino at resbinaria.com>

# COPYRIGHT AND LICENSE

        Copyright (C) 2022 Res Binaria Di Paolo Capaldo (<https://www.resbinaria.com/>)

        Original python code:
        Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
        Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
        Copyright (C) 2012 Associazione OpenERP Italia

        All Rights Reserved

        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU Affero General Public License as published
        by the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU Affero General Public License for more details.

        You should have received a copy of the GNU Affero General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.



( run in 1.326 second using v1.01-cache-2.11-cpan-39bf76dae61 )