Sébastien Aperghis-Tramoni > Smolder-1.52 > Smolder::Util

Download:
Smolder-1.52.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  7
Open  15
View/Report Bugs
Source  

NAME ^

Smolder::Util

DESCRIPTION ^

Collection of various useful routines for Smolder

ROUTINES ^

pass_fail_color

Given a ratio, will return an RRGGBB color suitable for a web page as a visual indicator of a test's success. Green == 100%, Red == 0%.

format_time

Given a number of seconds, format it as string of the format HH:MM:SS or MM:SS or SS.

    Smolder::Util::format_time(1000); # prints 16:40
    Smolder::Util::format_time(35);   # prints 35
    Smolder::Util::format_time(100);  # prints 1:40

url_base

This method will return either the base url for the installed version of Smolder or the value of the UrlBase configuration option. UrlBase is useful for configurations where Smolder is hosted behind a proxy.

syntax highlighting: