2006-07-26から1日間の記事一覧

Encode::JP::Mobileを使う

携帯の絵文字がウザーなので 文字化けないようにする方法をためしてる。Sledge::Charsetの部分で。 use Encode; use Encode::JP::Mobile; use Carp;sub convert_param { my $self = shift; my $page = shift; my $agent_code; if ( $page->mobile->agent->is…

RedirectRefererにパッチ

package Sledge::Plugin::RedirectReferer;use warnings; use strict; use URI;our $VERSION = '0.03';sub import { my $self = shift; my $pkg = caller; no strict 'refs'; *{"$pkg\::redirect_referer"} = sub { my ($self , $url) = @_; if ( $self->r->…

SledgeもNEXTでゴリッ

package Proj::Pages::PC::Index; use base qw(Proj::Pages::PC Proj::PagesPiece::Index); use NEXT; sub dispatch_index { $self->NEXT::dispatch_index(); } 1; package Proj::Pages::Mobile::Index; use base qw(Proj::Pages::Mobile Proj::PagesPiece::…

Class::Plugged

でっちあげてみた。 package Class::Plugged; use strict; use warnings; use Class::Inspector;sub import { my $class = shift; my $pkg = caller; for my $method ( @{Class::Inspector->methods($class) || []} ) { next if $method eq 'import'; no str…