Skip to content

Commit

Permalink
fixed deprecation warnings in get command
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 1, 2014
1 parent 6f56f96 commit e721a42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,5 +1,6 @@

5.68 2014-12-01
- Fixed deprecation warnings in get command.

5.67 2014-11-27
- Improved overall performance by deserializing sessions only on demand.
Expand Down
7 changes: 4 additions & 3 deletions lib/Mojolicious/Command/get.pm
Expand Up @@ -99,13 +99,14 @@ sub _select {
($results = $results->slice($command)) and next if $command =~ /^\d+$/;

# Text
return _say($results->text->each) if $command eq 'text';
return _say($results->map('text')->each) if $command eq 'text';

# All text
return _say($results->all_text->each) if $command eq 'all';
return _say($results->map('all_text')->each) if $command eq 'all';

# Attribute
return _say($results->attr($args[0] // '')->each) if $command eq 'attr';
return _say($results->map(attr => $args[0] // '')->each)
if $command eq 'attr';

# Unknown
die qq{Unknown command "$command".\n};
Expand Down

0 comments on commit e721a42

Please sign in to comment.