Created
March 23, 2013 12:52
-
-
Save kazuph/5227625 to your computer and use it in GitHub Desktop.
Devel::KYTProfの最新版(0.03以降)だとエラーになるソースコード
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::Xslate; | |
use Devel::KYTProf; | |
use Data::Section::Simple; | |
Devel::KYTProf->add_prof( | |
"Text::Xslate", | |
"render", | |
sub { | |
my ($orig, $self, $file, $args) = @_; | |
return sprintf '%s %s', "render", $file; | |
} | |
); | |
my $tx = Text::Xslate->new( | |
path => [ Data::Section::Simple ->new()->get_data_section(), ], | |
); | |
print $tx->render('test.tx'); | |
__DATA__ | |
@@ test.tx | |
test | |
@@ result | |
Can't use string ("render test.tx") as an ARRAY ref while "strict refs" in use at /Users/MyUserName/.plenv/versions/5.16.2/lib/perl5/site_perl/5.16.2/Devel/KYTProf.pm line 252. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment