Michael Peters > Smolder-1.51 > Smolder::Util

Download:
Smolder-1.51.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  7
Open  15
View/Report Bugs
Source   Latest Release: Smolder-1.52

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 the base url for the installed version of Smolder.

syntax highlighting: