| 1 | package Text::Shellwords; | ||||||||||
| 2 | |||||||||||
| 3 | # simple wrapper around perl4-based shellwords.pl | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | require Exporter; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use Text::ParseWords(); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use vars qw(@ISA @EXPORT $VERSION); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | @ISA = 'Exporter'; | |||||||||
| 13 | 1 | $VERSION = '1.08'; | |||||||||
| 14 | |||||||||||
| 15 | 1 | @EXPORT = qw(shellwords); | |||||||||
| 16 | |||||||||||
| 17 | 5 | ▶ | sub shellwords { | ||||||||
|
Subroutine
shellwords: called CC=4 SCAR=14.1
Pod
undocumented
| |||||||||||
| 18 | 5 | my @args = @_; | |||||||||
| 19 | 5 | ▶ | return unless @args; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 5 | foreach(@args) { | |||||||||
| 21 | 6 | ▶ | $_ = '' unless defined $_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 6 | s/^\s+//; | |||||||||
| 23 | 6 | s/\s+$//; | |||||||||
| 24 | } | ||||||||||
| 25 | 5 | Text::ParseWords::shellwords(@args); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||