Skip to content

Commit

Permalink
updated meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Apr 2, 2013
1 parent c311944 commit a83f58e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"David Golden <dagolden@cpan.org>"
],
"dynamic_config" : 1,
"generated_by" : "Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.120921",
"generated_by" : "Dist::Zilla version 4.300031, CPAN::Meta::Converter version 2.130880",
"license" : [
"apache_2_0"
],
Expand Down Expand Up @@ -69,7 +69,7 @@
"provides" : {
"Capture::Tiny" : {
"file" : "lib/Capture/Tiny.pm",
"version" : "0.22"
"version" : "0.23"
}
},
"release_status" : "stable",
Expand All @@ -84,6 +84,6 @@
"web" : "https://github.com/dagolden/capture-tiny"
}
},
"version" : "0.22"
"version" : "0.23"
}

17 changes: 16 additions & 1 deletion README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Capture::Tiny - Capture STDOUT and STDERR from Perl, XS or external programs

=head1 VERSION

version 0.22
version 0.23

=head1 SYNOPSIS

Expand Down Expand Up @@ -81,6 +81,21 @@ scalar context on the return value, you must use the C<<< scalar >>> keyword.
return scalar @list; # $count will be 3
};

Also note that within the coderef, the C<<< @_ >>> variable will be empty. So don't
use arguments from a surrounding subroutine without copying them to an array
first:

sub wont_work {
my ($stdout, $stderr) = capture { do_stuff( @_ ) }; # WRONG
...
}

sub will_work {
my @args = @_;
my ($stdout, $stderr) = capture { do_stuff( @args ) }; # RIGHT
...
}

Captures are normally done to an anonymous temporary filehandle. To
capture via a named file (e.g. to externally monitor a long-running capture),
provide custom filehandles as a trailing list of option pairs:
Expand Down

0 comments on commit a83f58e

Please sign in to comment.