Apache-App-Mercury
view release on metacpan or search on metacpan
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
Mercury/Message/Attachment.pm view on Meta::CPAN
sub store_to_filesystem {
my ($self) = @_;
unless ($self->{'Name'} and $self->{'Data'}) {
$self->log_error("->store_to_filesystem: failed. object must contain Name and Data");
return undef;
}
# decide on a logical place on the filesystem to put file
my $date = join('', $self->get_date);
# set initial filename
$self->{'Filename'} = $self->{'Name'};
# if that already exists on fs, prepend N_ for N=1,2,3.. until it doesn't
while (-e FILESYS_BASE.$date."/".$self->{'Filename'}) {
if ($self->{'Filename'} =~ m/^\d+_/) {
$self->{'Filename'} =~ s/^(\d+)_/sprintf("%03d", $1+1)."_"/e;
} else {
( run in 1.373 second using v1.01-cache-2.11-cpan-de7293f3b23 )