| 1 | #!/usr/bin/env perl | ||||||||||
| 2 | # pfcat - cat out function definitions from perlfunc | ||||||||||
| 3 | # | ||||||||||
| 4 | # this is a command of its own so it can find the right version | ||||||||||
| 5 | |||||||||||
| 6 | # ------ pragmas | ||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | our $VERSION = '2.0.0'; | |||||||||
| 11 | |||||||||||
| 12 | # ------ define variable | ||||||||||
| 13 | 1 | my @options = (); # list of podgrep options | |||||||||
| 14 | |||||||||||
| 15 | 1 | @options = (); | |||||||||
| 16 | 1 | ▶ | while ($ARGV[0] =~ /^-/) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | push @options, shift @ARGV; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 1 | ▶ | die "usage: $0 function\n" unless @ARGV; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | |||||||||||
| 22 | 1 | system "$^X -S podgrep -h @options '@ARGV' `$^X -S podpath perlfunc`"; | |||||||||
| 23 | 1 | exit ($? != 0); | |||||||||
| 24 | |||||||||||
| 25 | __END__ | ||||||||||