2006å¹´07æ13æ¥ OOP OOPã§CGIããããªãããããï¼ use strict; package App; use base 'Class::Accessor'; __PACKAGE__->mk_accessors(qw(q)); use CGI; sub new { my $class = shift; my $self = $class->SUPER::new(@_); $self->init; return $self; } sub init { my $self = shift; $self->q(CGI->new); } sub go { my $self = shift; print $self->q->header(-type => 'text/plain'); if( $self->q->param('c') eq 'hello' ){ $self->hello;
{{#tags}}- {{label}}
{{/tags}}