Skip to content
Snippets Groups Projects
Commit bcec979f authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

forgotten in #bf7b134e

parent 50b72440
No related branches found
No related tags found
No related merge requests found
package AccountManager::Template::Plugin::Quote;
use strict;
use warnings;
use Template::Stash;
use constant DEFAULT_CHAR => '"';
$Template::Stash::SCALAR_OPS->{ quote } = sub {
my $scalar = shift;
my $char = shift || DEFAULT_CHAR;
return $char . $scalar . $char;
};
$Template::Stash::LIST_OPS->{ quote } = sub {
my $list = shift;
my $char = shift || DEFAULT_CHAR;
return [ map { $char . $_ . $char } @$list ];
};
1;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment