treebird/perl/attachments.pm
nekobit 3ac0145efc Postbox
FossilOrigin-Name: fa0971dfd73b18da2b62d02dcb1f3aa5ef301d17c21efab4ece79d5a6981a297
2022-08-01 04:56:10 +00:00

25 lines
460 B
Perl

package attachments;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT = qw( generate_attachment );
use template_helpers 'to_template';
use icons 'get_icon';
sub generate_attachment
{
my ($ssn, $data, $att, $sensitive) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
attachment => $att,
sensitive => $sensitive,
icon => \&get_icon,
);
to_template(\%vars, \$data->{'attachment.tt'});
}