This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Benchmark 'cmpthese'; | |
| use CGI; | |
| package Cat; | |
| sub walk {} | |
| package main; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use CGI::Header; | |
| my $h = CGI::Header->new; | |
| $h->expires('now'); | |
| warn $h->get('Expires'); # => "Thu, 28 Feb 2013 18:34:22 GMT" | |
| sleep 5; | |
| warn $h->get('Expires'); # => "Thu, 28 Feb 2013 18:34:27 GMT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| application/rss+xml; charset=utf-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -O "http://www.goken-net.co.jp/audio/audio_data/420-[001-115]-115.mp3" | |
| 1〜59 が disc 1、60~115 が disc 2 にあたる。 | |
| しかしながら、書籍に記載されているトラックとファイルの番号が対応していない。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package mt; | |
| use strict; | |
| use warnings; | |
| use parent 'Blosxom::Plugin'; | |
| use Text::MicroTemplate qw/encoded_string/; | |
| __PACKAGE__->load_components( 'DataSection' ); | |
| sub start { | |
| my $pkg = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Blosxom::Plugin::DataSection; | |
| use Blosxom::Plugin; # => imports init() | |
| package Blosxom::Plugin; | |
| sub import { | |
| # exports init() | |
| } | |
| # Blosxom::Plugin::Web* will be removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package conditional_get; | |
| use strict; | |
| use warnings; | |
| use CGI::Header; | |
| our $VERSION = '0.02'; | |
| sub start { $ENV{REQUEST_METHOD} =~ /^GET|HEAD$/ } | |
| sub last { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package js; | |
| use strict; | |
| use warnings; | |
| use parent 'Blosxom::Plugin::Web'; | |
| use Carp qw/croak/; | |
| use Encode; | |
| use HTTP::Date qw/time2isoz/; | |
| our $VERSION = '0.01'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package CGI::PSGI; | |
| use strict; | |
| use warnings; | |
| use parent 'CGI'; | |
| use CGI::Util; | |
| use CGI::Header; | |
| sub psgi_header { | |
| my ( $self, @args ) = @_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package last_modified; | |
| use strict; | |
| use warnings; | |
| use parent 'Blosxom::Plugin'; | |
| use CGI::Header; | |
| use HTTP::Date; | |
| use List::Util qw/max/; | |
| __PACKAGE__->mk_accessors( | |
| last_modified => sub { [] }, |