Fayland 林 > Foorum-1.001000 > Foorum::Utils

Download:
Foorum-1.001000.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.001000   Source  

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>

syntax highlighting: