I'm very impressed with this module, especially the section 'DIFFERNCE WITH OTHER WAYS' of pod. But I think it is better that we can specify the default encoding instead of 'utf-8', because (for example) most of current web designers in Japan prefer 'Shift_JIS' (or cp932) to 'UTF-8'. Coaching them to use '[% USE encoding 'shift-jis' %]' directive everywhere is also painful, isn't it ? :)
So I wrote the patch below.
Of course I could write new module which was inheritance of T::P::Encoding,
but I didn't because hard-coding 'utf-8' in original code seemed not so good.
There are two important points in this patch.
1. You can denote the desired encoding with 'DEFAULT_ENCODING' option in constructor.
2. Encoding detection mechanism now became the outer method 'detect_encoding()'. It makes easier to extend this module, for example, auto-encoding-detection collaborating with Encode::Guess.
This patch might not match the philosophy of T::P::Encoding, so I want any comments.