This file contains 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 GitFindCommit; | |
use strict; | |
use warnings; | |
use autodie; | |
use File::Spec; | |
our $VERSION = '0.01'; | |
sub new { | |
my ($class, %args) = @_; | |
my $git_repo = $args{repo}; |
This file contains 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
#!/usr/bin/perl | |
# Mojo::DOM を使い、 | |
# DOM form オブジェクトのパラメータを取り出す例 | |
use Mojo::DOM; | |
use Data::Dumper; | |
my $text = do { local $/ = undef; <DATA> }; | |
my $dom = Mojo::DOM->new($text); | |
my $forms = forms($dom); | |
print Data::Dumper->Dump( [$forms] ), "\n"; |
This file contains 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
#!env perl | |
# sacloud_archive.pl | |
# さくらのクラウドのディスクをアーカイブする | |
# アーカイブファイル名は、「ディスク名-YYYYMMDDThhmmss」とする。 | |
# $KEEP_ARCHIVES 世代をアーカイブとして保存する。 | |
# TODO アーカイブするのを自サーバのディスクだけに制限する。 | |
use strict; | |
use warnings; | |
use Mojo::UserAgent; | |
use Mojo::Log; |
This file contains 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
#!/bin/sh | |
# perl CGI デバッグ用ラッパースクリプト | |
# 使用方法 : ./cgi_wrapper.sh CGIプログラム | |
# REQUEST_METHOD, POST(POSTデータ), QUERY_STRING は | |
# 本スクリプト外で設定することができる。 | |
export LANG=C | |
export TZ=JST-9 | |
export REQUEST_METHOD=POST | |
if [ "X$REQUEST_METHOD" == "XPOST" ]; then |