App-WRT
view release on metacpan or search on metacpan
lib/App/WRT/Markup.pm view on Meta::CPAN
}
}
=item textile_process
Inline replace <textile> markup in a string.
=cut
# This is exactly the kind of code that, even though it isn't doing anything
# especially over the top, looks ghastly to people who don't read Perl, so I'll
# try to explain a bit.
sub textile_process {
# First, there's a state variable here which can retain the Text::Textile
# object between invocations of the function, saving us a bit of time on
# subsequent calls. This should be equivalent to creating a closure around
# the function and keeping a $textile variable there.
state $textile;
t/wrt_date.t view on Meta::CPAN
ok(
App::WRT::Date::month_name(1) eq 'January',
'month_name(1) is January'
);
my $year = App::WRT::Date::get_date('year') + 1900;
ok(
($year =~ /^[0-9]+$/) && ($year > 1900),
'sure looks like a year'
);
my (@values) = App::WRT::Date::get_date('wday', 'yday', 'mon');
my $length = @values;
ok($length == 3, 'got multiple values');
( run in 0.339 second using v1.01-cache-2.11-cpan-64827b87656 )