Skip to content

Commit

Permalink
Use slurp rather than re-implementing it.
Browse files Browse the repository at this point in the history
Especially now re-implementing it has become a good bit trickier.
  • Loading branch information
jnthn committed May 30, 2017
1 parent c0b2b02 commit 81e3f64
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/core/CompUnit/Repository/FileSystem.pm
Expand Up @@ -76,13 +76,8 @@ class CompUnit::Repository::FileSystem does CompUnit::Repository::Locally does C
nqp::until(
nqp::eqaddr((my $pulled := $iter.pull-one),IterationEnd),
nqp::if(
nqp::filereadable($pulled)
&& (my $pio := nqp::open($pulled,'r')),
nqp::stmts(
nqp::setencoding($pio,'iso-8859-1'),
nqp::push_s($parts,nqp::sha1(nqp::readallfh($pio))),
nqp::closefh($pio)
)
nqp::filereadable($pulled),
nqp::push_s($parts,nqp::sha1(slurp($pulled, :enc<iso-8859-1>))),
)
),
nqp::if(
Expand Down

0 comments on commit 81e3f64

Please sign in to comment.