treebird/perl/attachments.pm
nekobit 2609b8d54f Seperate notifications logic, fix perl modules
FossilOrigin-Name: 8dedd9a9e0ca9f982140de1e980be166d07e9d549eae5cb50115fc3a7a414ae6
2022-08-17 02:08:13 +00:00

26 lines
463 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'});
}
1;