| 1 | package XML::Literal; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 1 | ▶ | use 5.006; | ||||||||||||
|
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 | 1 | ▶ | use File::Glob (); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 1 | $XML::Literal::VERSION = '0.02'; | |||||||||||||
| 9 | |||||||||||||||
| 10 | 1 | ▶ | sub import { | ||||||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | 1 | my $class = shift; | |||||||||||||
| 12 | 1 | my $callback = shift; | |||||||||||||
| 13 | |||||||||||||||
| 14 | 1 | ▶ | no warnings 'redefine'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 15 | 6 | ▶ | *CORE::GLOBAL::glob = sub { | ||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||
| 16 | 6 | ▶ | if ($_[0] =~ m{^\s*<}) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 17 | # Looks like < <tag> > | ||||||||||||||
| 18 | 2 | goto &$callback; | |||||||||||||
| 19 | } | ||||||||||||||
| 20 | elsif ($_[0] =~ m{/\w*\s*$}) { | ||||||||||||||
| 21 | # Looks like <tag/> or <tag\>...\</tag> | ||||||||||||||
| 22 | 3 | @_ = "<$_[0]>"; | |||||||||||||
| 23 | 3 | goto &$callback; | |||||||||||||
| 24 | } | ||||||||||||||
| 25 | else { | ||||||||||||||
| 26 | # Looks like file globbing | ||||||||||||||
| 27 | 1 | goto &File::Glob::glob; | |||||||||||||
| 28 | } | ||||||||||||||
| 29 | 1 | }; | |||||||||||||
| 30 | } | ||||||||||||||
| 31 | |||||||||||||||
| 32 | 1 | 1; | |||||||||||||
| 33 | |||||||||||||||
| 34 | __END__ | ||||||||||||||