Package DE_EPAGES::ShopTransfer::API::BCPEditor
Examines and manipulates BCP files.
Example |
$Editor = DE_EPAGES::ShopTransfer::API::BCPEditor->new('object.bcp'); $ShopsFolderID = $Editor->findRows({ 2 => 1, 3 => 'Shops' })->[0]->[0]; $aShops = $Editor->findRows({ 2 => $ShopsFolderID }); |
Functions
countRows
Counts all rows where the specified columns have the specified values. Returns the total number of lines if $hFind is an empty hash.
Syntax |
$Count = $Editor->countRows($hFind); |
Input |
|
Return |
|
deleteRows
Deletes all rows where the specified columns have the specified values.
Syntax |
$Editor->deleteRows($hFind); |
Input |
|
findRows
Returns all rows where the specified columns have the specified values.
Syntax |
$aRows = $Editor->findRows($hFind); |
Input |
|
Return |
|
forEach
Calls $Sub->(@Values) for each row.
Syntax |
$Editor->forEach($Sub); |
Input |
|
map
Runs $Sub->(@Values) on all rows. The return list of $Sub replaces the current values of the row. The modified rows are written back to the original file.
Syntax |
$Editor->map($Sub); |
Input |
|
new
Creates a BCPEditor object
Syntax |
$Editor = DE_EPAGES::ShopTransfer::API::BCPEditor->new($FileName, $Encoding); |
Input |
|
Return |
|
updateRows
Runs $Sub->(@Values) on all rows where the specified columns have the specified values. The return list of $Sub replaces the current values of the row. The modified rows are written back to the original file.
Syntax |
$Editor->updateRows($hFind, $Sub); |
Input |
|