Subject: | have copy_to return filename of resultant file |
hello
currently if a software artist uses the copy_to($path) function, where
$path is directory - then the file is copied to "$path/$tmpfilename". if
$path is actually a full filename, then this is used.
in the case where saving using the $tmpfilename is convenient (as it
generates a unique filename for the artist), it would be even more
convenient if the copy_to function returned the resultant filename. this
would not break backward compatibility (unless another artist is
explicitly looking for copy_to() == '1')
so the interface would be enhanced to this sort of functionality
if (my $filename = $obj->copy_to("/some/place")) {
$c->stash->{message} = "File was saved as $filename";
} else {
# other
}