Skip to content

Instantly share code, notes, and snippets.

@kazuph
Created March 23, 2013 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuph/5227625 to your computer and use it in GitHub Desktop.
Save kazuph/5227625 to your computer and use it in GitHub Desktop.
Devel::KYTProfの最新版(0.03以降)だとエラーになるソースコード
#!/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