CGI-Screen
view release on metacpan or search on metacpan
-status => '200 OK',
-expires => '+120s',
);
my $font = $query->param('font');
my $w = GD::Font->$font()->width;
my $h = GD::Font->$font()->height;
my $im = GD::Image->new((length($query->param('foo'))+2)*$w,$h);
my $white = $im->colorAllocate(255,255,255);
my $red = $im->colorAllocate(255,0,0);
my $black = $im->colorAllocate(0,0,0);
$im->transparent($white);
$im->arc(8,8,5,5,0,360,$red);
$im->string(GD::Font->$font(),10,0,$query->param('foo'),$black);
print $im->gif;
}
Keeping parameter values
CGI::Screen keeps track of the CGI parameters used in the current form.
It simply looks at the first parameter in any call to a CGI method. If
the first parameter is `-name', the second parameter is marked as *used
print unpack 'u', $_;
}
} else {
my $font = $query->param('font');
my $w = GD::Font->$font()->width;
my $h = GD::Font->$font()->height;
my $im = GD::Image->new((length($query->param('foo'))+2)*$w,$h);
my $white = $im->colorAllocate(255,255,255);
my $red = $im->colorAllocate(255,0,0);
my $black = $im->colorAllocate(0,0,0);
$im->transparent($white);
$im->arc(8,8,5,5,0,360,$red);
$im->string(GD::Font->$font(),10,0,$query->param('foo'),$black);
print $im->gif;
}
}
sub manual_screen {
my $query = shift;
require Pod::Text;
lib/CGI/Screen.pm view on Meta::CPAN
-status => '200 OK',
-expires => '+120s',
);
my $font = $query->param('font');
my $w = GD::Font->$font()->width;
my $h = GD::Font->$font()->height;
my $im = GD::Image->new((length($query->param('foo'))+2)*$w,$h);
my $white = $im->colorAllocate(255,255,255);
my $red = $im->colorAllocate(255,0,0);
my $black = $im->colorAllocate(0,0,0);
$im->transparent($white);
$im->arc(8,8,5,5,0,360,$red);
$im->string(GD::Font->$font(),10,0,$query->param('foo'),$black);
print $im->gif;
}
=head2 Keeping parameter values
CGI::Screen keeps track of the CGI parameters used in the current
form. It simply looks at the first parameter in any call to a CGI
method. If the first parameter is C<-name>, the second parameter is
( run in 0.568 second using v1.01-cache-2.11-cpan-a1d94b6210f )