Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make ::File a little simpler

  • Loading branch information...
commit ff7719067380d9a100bb1a15360b17deef380802 1 parent f80788f
@jberger authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Galileo/File.pm
View
10 lib/Galileo/File.pm
@@ -13,17 +13,17 @@ sub list {
$self->on( text => sub {
my ($ws, $text) = @_;
- my $data = j $text;
- my $list = $self->_get_list( $iter, $dir, $data->{limit} );
+ my $data = j($text);
+ my $list = _get_list( $iter, $dir, $data->{limit} );
$ws->send({ text => j( $list ) });
});
}
sub _get_list {
- my ($self, $iter, $dir, $limit) = @_;
+ my ($iter, $dir, $limit) = @_;
unless ( defined $iter ) {
- return {files => [], finished => \1};
+ return +{files => [], finished => \1};
}
$limit ||= 20;
@@ -43,7 +43,7 @@ sub _get_list {
push @files, File::Spec->abs2rel($file, $dir);
}
- return { files => [sort @files], finished => $finished };
+ return +{ files => [sort @files], finished => $finished };
}
1;
Please sign in to comment.
Something went wrong with that request. Please try again.