NAME
Finance::DST::FAN::Mail::Download::Plugin::Rename - Rename files after downloading
DESCRIPTION
This role is a plugin for Finance::DST::FAN::Mail::Download. It builds on top of Finance::DST::FAN::Mail::Download::Plugin::Unzip and renames the file after the unzip operation is completed successfully. All methods and attributes will be automatically consumed by that class at load time.
METHODS
_download
around '_download'
. Wraps the download method, calls unzip if necessary and calls _rename
after downloading.
_rename $unziped_file
Will rename the file to the following format:
# eg ACMECO_APR_20081231_REIT_0_00
${provider}_${file_type}_${date_ymd}_${product_type}_${resend_indicator}_${counter}
Returns the new filename upon success and throws an exception on failure.
SEE ALSO
Finance::DST::FAN::Mail::Download, Finance::DST::FAN::Mail::Download::Plugin::Unzip Finance::DST::FAN::Mail::Download::Plugin::Split
AUTHOR & LICENSE
Please see Finance::DST::FAN::Mail for more information.