| 1 | package Bencher::Scenario::ShellQuote::Any; | ||
| 2 | |||
| 3 | 1 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 8 | 1 | our $DATE = '2023-01-17'; # DATE | |
| 9 | 1 | our $DIST = 'Bencher-Scenario-ShellQuote-Any'; # DIST | |
| 10 | 1 | our $VERSION = '0.005'; # VERSION | |
| 11 | |||
| 12 | 1 | our $scenario = { | |
| 13 | summary => 'Benchmark cross-platform shell quoting', | ||
| 14 | participants => [ | ||
| 15 | { | ||
| 16 | fcall_template=>'ShellQuote::Any::shell_quote(<cmd>)', | ||
| 17 | }, | ||
| 18 | { | ||
| 19 | fcall_template=>'PERLANCAR::ShellQuote::Any::shell_quote(@{<cmd>})', | ||
| 20 | }, | ||
| 21 | { | ||
| 22 | fcall_template=>'ShellQuote::Any::Tiny::shell_quote(<cmd>)', | ||
| 23 | }, | ||
| 24 | ], | ||
| 25 | datasets => [ | ||
| 26 | {name=>'empty0', args=>{cmd=>[]}}, | ||
| 27 | {name=>'empty1', args=>{cmd=>['']}}, | ||
| 28 | {name=>'cmd1', args=>{cmd=>['foo bar']}}, | ||
| 29 | {name=>'cmd5', args=>{cmd=>['foo', 'bar', 'baz', 'qux', 'quux']}}, | ||
| 30 | ], | ||
| 31 | }; | ||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | # ABSTRACT: Benchmark cross-platform shell quoting | ||
| 35 | |||
| 36 | __END__ | ||