View record_radiko.pl
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use FindBin::libs; | |
use Radiko; | |
my $radiko = Radiko->new( | |
channel => 'INT', # see http://www.dcc-jpl.com/foltia/wiki/radikomemo |
View Text::MicroTemplate sample
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/env perl | |
use strict; | |
use warnings; | |
use Text::MicroTemplate qw/:all/; | |
use YAML qw/Dump/; | |
my $text = << '...'; | |
<?= $hoge ?> |
View gist:117938
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
diff --git a/t/004_forward.t b/t/004_forward.t | |
index 3130ffa..21f8bb8 100644 | |
--- a/t/004_forward.t | |
+++ b/t/004_forward.t | |
@@ -42,6 +42,16 @@ use Test::Base; | |
my ($self, $c) = @_; | |
$c->res->{body} .= 'six_'; | |
} | |
+ | |
+ sub seven : Local { |
View gist:118495
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
diff --git a/lib/Ark/Test.pm b/lib/Ark/Test.pm | |
index 9ec8f11..4f0eec4 100644 | |
--- a/lib/Ark/Test.pm | |
+++ b/lib/Ark/Test.pm | |
@@ -5,6 +5,8 @@ use HTTP::Request; | |
use HTTP::Engine; | |
use HTTP::Cookies; | |
+use YAML qw/Dump/; | |
+ |
View gist:137282
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
diff --git a/lib/Ark/View/MT.pm b/lib/Ark/View/MT.pm | |
index 7ba34a0..c809199 100644 | |
--- a/lib/Ark/View/MT.pm | |
+++ b/lib/Ark/View/MT.pm | |
@@ -75,7 +75,7 @@ sub render { | |
or return; | |
my $renderer = $self->build_template($template . $self->extension); | |
- $renderer->($self->context, @_)->as_string; | |
+ $renderer->($self, $self->context, @_)->as_string; |
View gist:137287
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 ArkApp::View::MTFile; | |
use Ark 'View::MTFile'; | |
has '+wrapper' => default => 'wrapper'; | |
has '+wrapper_pre' => default => sub { | |
my $self = shift; | |
return '<? $self->wrapper_file(\'' . $self->wrapper . $self->extension . "')->( sub {?>"; | |
}; |
View gist:143402
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
diff --git a/lib/Text/MicroTemplate/Extended.pm b/lib/Text/MicroTemplate/Extended.pm | |
index d775b80..0474663 100644 | |
--- a/lib/Text/MicroTemplate/Extended.pm | |
+++ b/lib/Text/MicroTemplate/Extended.pm | |
@@ -34,15 +34,17 @@ sub block { | |
code => \$code, | |
}; | |
- my \$current_ref = \$$self->{package_name}::_MTREF; | |
- my \$block_ref = \$block->{context_ref}; |
View gist:148957
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
// very very simple js validation? | |
var Validation = { | |
form : { | |
nickname : [[ | |
function (data) { return data.length <= 10; }, | |
'10文字以内で入力してください' | |
]], | |
rating : [[ | |
function (data) { return 1 <= data && data <= 5; }, | |
'1〜5までの数字からお選びください' |
View gist:165131
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
diff --git a/lib/Ark/Action.pm b/lib/Ark/Action.pm | |
index e6565b3..5dd972c 100644 | |
--- a/lib/Ark/Action.pm | |
+++ b/lib/Ark/Action.pm | |
@@ -21,6 +21,14 @@ has controller => ( | |
no Mouse; | |
+do { | |
+ my %contained_action_class; |
View gist:165132
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
use Test::Base; | |
plan 'no_plan'; | |
{ | |
package T; | |
use Ark; | |
package T::MyActionClass; | |
use Mouse::Role; |
OlderNewer