11 October 2008
This post may be outdated due to it was written on 2008. The links may be broken. The code may be not working anymore. Leave comments if needed.
augment can be used as trigger in sub, to let user do something he wants.

for example, I want to let user custom $message before insert into $file in IRC::Bot::Log::Extended.
so that he can skip some lines or URI::Find some URLs.

full code are:

I also write a simple test script:

hmm, that's simple. just think about u defined a virtual sub in parent pm, then user can override it in child pm.
nothing special.


blog comments powered by Disqus