Last active
August 29, 2015 14:11
-
-
Save rwstauner/de8865e4e0697ba2c9b4 to your computer and use it in GitHub Desktop.
Pod::Simple parsing binary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -e ' print "hi\n\n=F\0?}\302\240\0?}\302\200\n\nyo\n" '| perl -0777 -M'5; sub Pod::Simple::DEBUG { 10 }' -MPod::Text -ne ' my $parser = Pod::Text->new( code => 0, alt => 1, sentence => 0, width => 78 ); $parser->no_errata_section(1); $parser->parse_string_document($_) ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MANY_LINES is 20 | |
# We are in ASCII-land | |
# We are under a Unicode-safe Perl. | |
# Parsing starting at line 0. | |
# About to parse lines: [hi] | |
First line: [hi] | |
First line is BOM-less. | |
# Parsing line: [hi] | |
# It's a code-line. | |
# Parsing starting at line 1. | |
# About to parse lines: [] | |
# Parsing line: [] | |
# It's a code-line. | |
# Parsing starting at line 2. | |
# About to parse lines: [=F?} ?}] | |
Found an encoding line "=encoding UTF-8" | |
About to try loading Pod::Simple::TranscodeSmart... | |
OK, loaded Pod::Simple::TranscodeSmart. | |
Setting encoding to UTF-8 | |
Discarding erratum (at line 3) Non-ASCII character seen before =encoding in '=F?}�?}�'. Assuming UTF-8 | |
because no_errata_section is on. | |
# Parsing line: [=F?}�?}�] | |
Starting plain para at line 3 | |
[ "~Para", {"start_line"=>3}, "=F\x{0}?}\x{a0}\x{0}?}\x{80}" ] | |
# Parsing starting at line 3. | |
# About to parse lines: [] | |
# Parsing line: [] | |
Noting para ends with blank line at 4 | |
[ "~Para", {"start_line"=>3}, "=F\x{0}?}\x{a0}\x{0}?}\x{80}" ] | |
# Parsing starting at line 4. | |
# About to parse lines: [yo] | |
# Parsing line: [yo] | |
# Starting contentful document | |
Pondering a ~Para paragraph, given the stack: ([empty]) | |
Pondering non-magical ~Para | |
Treating Plain paragraph as such because stack is empty. | |
giving plain treatment... | |
Paragraph: | |
=F?} ?}� | |
Paragraphic tokenstack = () | |
Found stuff "=F?} ?}�" | |
Skipping _remap_sequences: formatless treelet. | |
Formatless treelet gets fast-tracked. | |
[ "Para", {"start_line"=>3}, "=F\x{0}?} \x{0}?}\x{80}" ] | |
Starting plain para at line 5 | |
[ "~Para", {"start_line"=>5}, "yo" ] | |
# Parsing starting at line 5. | |
# About to parse lines: EOF | |
# Undef-line seen. | |
Pondering a ~Para paragraph, given the stack: ([empty]) | |
Pondering non-magical ~Para | |
Treating Plain paragraph as such because stack is empty. | |
giving plain treatment... | |
Paragraph: | |
yo | |
Paragraphic tokenstack = () | |
Found stuff "yo" | |
Skipping _remap_sequences: formatless treelet. | |
Formatless treelet gets fast-tracked. | |
[ "Para", {"start_line"=>5}, "yo" ] | |
Pondering a ~end paragraph, given the stack: ([empty]) | |
Okay, stack is empty now. | |
Throwing end-document event. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment