Perlコーディング初心者質問スレ Part 56at PHP
Perlコーディング初心者質問スレ Part 56 - 暇つぶし2ch469:nobodyさん
07/10/31 19:51:49
>>467 method_nameチェックしてるから大丈夫

使い方も書いたつもりだったんだけど書けてなかった。
#!/usr/bin/perl
use strict;
use warnings;
use base qw(Local::Base);
my $r = eval{
__PACKAGE__->new(
method_name => {
edit => 'edit',
post => 'post'
}
)
} || $@;
print CGI->header,$r,"\n" unless ref $r;
######################################################################
# editの動作を定義
sub edit :method {
my $self = shift;
print $self->header;
print "EDITモード";
return $self;
}
1;



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch