The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Foorum::Utils - some common functions

FUNCTIONS

encodeHTML/decodeHTML

Convert any '<', '>' or '&' characters to the HTML equivalents, '&lt;', '&gt;' and '&amp;', respectively.

encodeHTML is the same as TT filter 'html'

is_color($color)

make sure color is ^\#[0-9a-zA-Z]{6}$

generate_random_word($len)

return a random word (length is $len), char is random ('A' .. 'Z', 'a' .. 'z', 0 .. 9)

!#@!$#$^%$ bad English

get_page_from_url

since we always use /page=(\d+)/ as in sub/pager.html

truncate_text

truncate text using Encode utf8

be_url_part

convert (title) string to be an acceptable URL part

AUTHOR

Fayland Lam <fayland at gmail.com>