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.
ATTRIBUTES
_uuid_gen
- _has_uuid_gen - predicate
- _clear_uuid_gen - clearer
- _build__uuid_gen - builder. does a simple
new Data::UUID
Read-only lazy-building Data::UUID object.
METHODS
_unzip
around '_unzip'
. Wraps the unzip method and calls _rename
after downloading. the value returned by _unzip
will be the name of the new filename.
_rename $unziped_file
Will rename the file to the following format ${provider}_${type}_${date_ymd}_${resend_indicator}_${uuid} eg DTCCR_01_20081231_0_FFCA0AD0-A8FB-11DC-9F8C-01E8798CBAC4 and return the new filename.
SEE ALSO
Finance::DST::FAN::Mail::Download, Finance::DST::FAN::Mail::Download::Plugin::Unzip Finance::DST::FAN::Mail::Download::Plugin::Split
AUTHOR
Guillermo Roditi (groditi) <groditi@cpan.org>
BUGS, FEATURE REQUESTS AND CONTRIBUTIONS
Google Code Project Page - http://code.google.com/p/finance-dst-fan-mail/
LICENSE
You may distribute this code under the same terms as Perl itself.