2008-04-30から1日間の記事一覧
↓のような感じで他のパッケージにメソッドを生やすってのはよく有る手法なんですが sub import { my $class = shift; my $pkg = caller; no strict 'refs'; *{"$pkg\::method"} = \&method; } id:hirataraさんの↓で述べられてありますが http://d.hatena.ne.…
↓のような感じで他のパッケージにメソッドを生やすってのはよく有る手法なんですが sub import { my $class = shift; my $pkg = caller; no strict 'refs'; *{"$pkg\::method"} = \&method; } id:hirataraさんの↓で述べられてありますが http://d.hatena.ne.…