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

23 lines
478 B
Perl

package postbox;
use strict;
use warnings;
use template_helpers 'to_template';
use string_helpers qw( get_mentions_from_content );
use Exporter 'import';
our @EXPORT = qw( generate_postbox );
sub generate_postbox
{
my ($ssn, $data, $status) = @_;
my %vars = (
prefix => '',
ssn => $ssn,
data => $data,
status => $status,
mentionify => \&get_mentions_from_content,
);
to_template(\%vars, \$data->{'postbox.tt'});
}