2009年7月29日星期三

我对南京有爱阿

回一趟南京,就十万分不想回苏州,特别买火车票之后在玄武湖前面发呆,看着波光粼粼倒映城市,就觉得南京是多么的好。
无论如何
该走还得走

See and download the full gallery on posterous

Posted via email from redicaps's posterous

2009年7月18日星期六

毕业-何以成虎?

虎的脚步从山涧走过

这时间来了

惊骇的风没法阻挡

惊骇的风没法阻挡

虎大踏步的走过

 

何以成虎?

彩虹和火山低声怒吼

               ————雷声隆隆

滚烫岩石烧裂了皮肤

              ————太阳光辉

 

何以成虎?

丛林边际是草原入口

那里有奇怪的狗尾草

长长脖子的老学究

和花皮肤的野猫

 

 

Posted via web from redicaps's posterous

2009年7月12日星期日

The End of My Student Life

尽管不情愿,不高兴,不乐意,不希望,但我的学生时代结束了。

Posted via email from redicaps's posterous

2009年7月7日星期二

blog搬家

鉴于blogspot被封,tor发现也运转不正常,决定把blog搬到cyclelifealone.posterous.com。此网站提供autopost到blogspot的功能,所以blogspot还能同步更新,不过如果post有改动的话,会出现重复post的情况,是为不爽。

Posted via web from redicaps's posterous

Ooops, I made a mistake

I never have to request a namespace at pause.cpan.org. Just uploading module source to this site, and this module will automatically shows up at search.cpan.org. So we have Class::Accessor::WithDefault

Posted via web from redicaps's posterous

2009年7月6日星期一

object-oriented coding in perl

Well, even if I don't want to admit, writing object-oriented code in Perl is painful without using any modules. Function "Bless" provides basic object ability, but when it comes to other features just like "inside-out object, private methods, easy-coding accessors", bless is not enough.

That's why there are so many modules on CPAN providing object-oriented feature for Perl. Class::InsideOut, Object::InsideOut,Class::Struct, Class::Methodmaker, Class::Generate etc.. Class::Accessor may be the simplest and easiest module for "easy-coding accessors". However, when I was writing my module"Net::Douban", I found setting default value for the feilds for the package is so important, which Class::Accessor dose not provide. So I spent some time hacking on this module, and wrote a module called "Class::Accessor::WithDefault" which can provide setting default value ability to Class::Accessor. It has some drawbacks because Class::Accessor using "Closure" to build the accessor and mutator but I think it is useful, right now it can be found at github here. Then I submitted this module request to CPA, sadly some days passed and I got no return message from that side.

By the way, after some coding experience with "Net::Douban", I realized that Moose should be the best choice for a Perl Progammer to write object-oriented code.

Posted via email from redicaps's posterous

腰,骑行和不计后果的锻炼

西宁-拉萨 17day,2000km
回宁之后腰痛到现在,近一年时间
爬紫金山都能感觉腰痛而力不从心
原以为是办公室坐姿不正确而造成
link
看来很有可能是青藏线落下的毛病
情何以堪

Posted via web from redicaps's posterous