treebird/perl/status.pm
nekobit 9069a17a41 Statuses
FossilOrigin-Name: cff813d2d65c0ce99156358724ecff352e0c5a25feb605f2a46f48b0869cf80b
2022-07-28 05:14:24 +00:00

37 lines
687 B
Perl

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