Skip to content

Instantly share code, notes, and snippets.

@b-abctech
Forked from nutzhub/gist:5821556
Created June 20, 2013 10:45
Show Gist options
  • Save b-abctech/5821799 to your computer and use it in GitHub Desktop.
Save b-abctech/5821799 to your computer and use it in GitHub Desktop.
for my $method (qw(build_date bought_date)) {
Sub::Install::install($_ => sub {
my ($self, $input_arg) = @_;
return format_string($self->$method);
});
}
sub apejens {}
*<package>::apejens = \&sub {};
$c->stash(
dt_formater => DateTime::Format::Natural->new(),
);
[% item.bought.strftime('%y-%m-%d') %]
[% relative_time(item.bought) %]
[% item.description OR 'Default' %]
[% FOR item.stores
for (qw(user_id)) {
Exception->throw("$_ is not specified") unless ${$_};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment