| 1 | package Text::Upskirt; | ||||||||||
| 2 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | $Text::Upskirt::VERSION = '0.100'; | |||||||||
| 4 | } | ||||||||||
| 5 | # ABSTRACT: turns baubles into trinkets | ||||||||||
| 6 | |||||||||||
| 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 | 1 | ▶ | use 5.012003; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | use constant {HTML_SKIP_HTML => (1 << 0), | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | HTML_SKIP_STYLE => (1 << 1), | ||||||||||
| 14 | HTML_SKIP_IMAGES => (1 << 2), | ||||||||||
| 15 | HTML_SKIP_LINKS => (1 << 3), | ||||||||||
| 16 | HTML_EXPAND_TABS => (1 << 5), | ||||||||||
| 17 | HTML_SAFELINK => (1 << 7), | ||||||||||
| 18 | HTML_TOC => (1 << 8), | ||||||||||
| 19 | HTML_HARD_WRAP => (1 << 9), | ||||||||||
| 20 | HTML_GITHUB_BLOCKCODE => (1 << 10), | ||||||||||
| 21 | 1 | HTML_USE_XHTML => (1 << 11)}; | |||||||||
| 22 | |||||||||||
| 23 | 1 | require Exporter; | |||||||||
| 24 | 1 | ▶ | use AutoLoader; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 1 | our @ISA = qw(Exporter); | |||||||||
| 27 | |||||||||||
| 28 | # Items to export into callers namespace by default. Note: do not export | ||||||||||
| 29 | # names by default without a very good reason. Use EXPORT_OK instead. | ||||||||||
| 30 | # Do not simply export all your public functions/methods/constants. | ||||||||||
| 31 | |||||||||||
| 32 | # This allows declaration use Text::Upskirt ':all'; | ||||||||||
| 33 | # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK | ||||||||||
| 34 | # will save memory. | ||||||||||
| 35 | 1 | our %EXPORT_TAGS = ( 'all' => [ qw( | |||||||||
| 36 | MKDEXT_AUTOLINK | ||||||||||
| 37 | MKDEXT_FENCED_CODE | ||||||||||
| 38 | MKDEXT_LAX_HTML_BLOCKS | ||||||||||
| 39 | MKDEXT_NO_INTRA_EMPHASIS | ||||||||||
| 40 | MKDEXT_SPACE_HEADERS | ||||||||||
| 41 | MKDEXT_STRIKETHROUGH | ||||||||||
| 42 | MKDEXT_TABLES | ||||||||||
| 43 | HTML_SKIP_HTML | ||||||||||
| 44 | HTML_SKIP_STYLE | ||||||||||
| 45 | HTML_SKIP_IMAGES | ||||||||||
| 46 | HTML_SKIP_LINKS | ||||||||||
| 47 | HTML_EXPAND_TABS | ||||||||||
| 48 | HTML_SAFELINK | ||||||||||
| 49 | HTML_TOC | ||||||||||
| 50 | HTML_HARD_WRAP | ||||||||||
| 51 | HTML_GITHUB_BLOCKCODE | ||||||||||
| 52 | HTML_USE_XHTML | ||||||||||
| 53 | markdown | ||||||||||
| 54 | smartypants | ||||||||||
| 55 | ) ], | ||||||||||
| 56 | 'ext' => [ qw ( | ||||||||||
| 57 | MKDEXT_AUTOLINK | ||||||||||
| 58 | MKDEXT_FENCED_CODE | ||||||||||
| 59 | MKDEXT_LAX_HTML_BLOCKS | ||||||||||
| 60 | MKDEXT_NO_INTRA_EMPHASIS | ||||||||||
| 61 | MKDEXT_SPACE_HEADERS | ||||||||||
| 62 | MKDEXT_STRIKETHROUGH | ||||||||||
| 63 | MKDEXT_TABLES | ||||||||||
| 64 | )], | ||||||||||
| 65 | 'html' => [ qw ( | ||||||||||
| 66 | HTML_SKIP_HTML | ||||||||||
| 67 | HTML_SKIP_STYLE | ||||||||||
| 68 | HTML_SKIP_IMAGES | ||||||||||
| 69 | HTML_SKIP_LINKS | ||||||||||
| 70 | HTML_EXPAND_TABS | ||||||||||
| 71 | HTML_SAFELINK | ||||||||||
| 72 | HTML_TOC | ||||||||||
| 73 | HTML_HARD_WRAP | ||||||||||
| 74 | HTML_GITHUB_BLOCKCODE | ||||||||||
| 75 | HTML_USE_XHTML | ||||||||||
| 76 | )], | ||||||||||
| 77 | |||||||||||
| 78 | ); | ||||||||||
| 79 | |||||||||||
| 80 | 1 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||
| 81 | |||||||||||
| 82 | 1 | our @EXPORT; | |||||||||
| 83 | |||||||||||
| 84 | |||||||||||
| 85 | 6 | ▶ | sub AUTOLOAD { | ||||||||
|
Subroutine
AUTOLOAD: called CC=3 SCAR=11.1
| |||||||||||
| 86 | # This AUTOLOAD is used to 'autoload' constants from the constant() | ||||||||||
| 87 | # XS function. | ||||||||||
| 88 | |||||||||||
| 89 | 6 | my $constname; | |||||||||
| 90 | 6 | our $AUTOLOAD; | |||||||||
| 91 | 6 | ($constname = $AUTOLOAD) =~ s/.*:://; | |||||||||
| 92 | 6 | ▶ | croak "&Text::Upskirt::constant not defined" if $constname eq 'constant'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 93 | 6 | my ($error, $val) = constant($constname); | |||||||||
| 94 | 0 | ▶ | if ($error) { croak $error; } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | { | ||||||||||
| 96 | 1 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 97 | # Fixed between 5.005_53 and 5.005_61 | ||||||||||
| 98 | #XXX if ($] >= 5.00561) { | ||||||||||
| 99 | #XXX *$AUTOLOAD = sub () { $val }; | ||||||||||
| 100 | #XXX } | ||||||||||
| 101 | #XXX else { | ||||||||||
| 102 | 6 | ▶ | *$AUTOLOAD = sub { $val }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 103 | #XXX } | ||||||||||
| 104 | } | ||||||||||
| 105 | 6 | goto &$AUTOLOAD; | |||||||||
| 106 | } | ||||||||||
| 107 | |||||||||||
| 108 | 1 | require XSLoader; | |||||||||
| 109 | 1 | XSLoader::load('Text::Upskirt', $Text::Upskirt::VERSION); | |||||||||
| 110 | |||||||||||
| 111 | # Preloaded methods go here. | ||||||||||
| 112 | |||||||||||
| 113 | # Autoload methods go after __END__, and are processed by the autosplit program. | ||||||||||
| 114 | |||||||||||
| 115 | 1 | 1; | |||||||||
| 116 | __END__ | ||||||||||