Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replace use of File::Slurp with Path::Tiny
This change moves from File::Slurp to Path::Tiny.
File::Slurp is known to be buggy and vulnerable.
See also:

https://rt.cpan.org/Public/Bug/Display.html?id=95484
  • Loading branch information
MartinMcGrath committed May 11, 2014
1 parent 594da23 commit e8f8798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eg/kate.pl
Expand Up @@ -3,15 +3,15 @@
use warnings FATAL => 'all';

use Data::Dumper;
use File::Slurp qw(slurp);
use Path::Tiny;
use Syntax::Highlight::Engine::Kate::All;
use Syntax::Highlight::Engine::Kate;

my $kate = Syntax::Highlight::Engine::Kate->new(
language => 'Perl',
);

my $text = slurp(shift);
my $text = path(shift)->slurp;
my @hl = $kate->highlight($text);
print "==\n";
#print Dumper \@hl;
Expand Down

0 comments on commit e8f8798

Please sign in to comment.