Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I wrote a test script for your YAML. It checks for completeness. There's a bunch of omissions in your YAML file.

#!perl -w use strict; use YAML; use LWP::Simple; use Test::More; use B::Keywords; my $yaml = get( 'http://www.szabgab.com/articles/perlindex.yaml' ); my $index = Load( $yaml ); my %indexed_keywords; @indexed_keywords{ map keys %$_, values %$index } = (); my %expected_keywords; @expected_keywords{ @B::Keywords::Symbols, @B::Keywords::Barewords } = (); my @all_keywords = sort { lc($a) cmp lc($b) } do { my %uniq; grep !$uniq{$_}++, keys( %indexed_keywords ), keys( %expected_keywords ) }; plan tests => scalar @all_keywords; for my $keyword ( @all_keywords ) { ok( exists $indexed_keywords{$keyword}, "$keyword is indexed" ); # ok( exists $expected_keywords{$keyword}, # "$keyword is in the \"official\" list" ); } __END__ not ok 2 - $! is indexed # Failed test (TestIndex.pl at line 27) not ok 3 - $" is indexed # Failed test (TestIndex.pl at line 27) not ok 4 - $\# is indexed # Failed test (TestIndex.pl at line 27) not ok 5 - $$ is indexed # Failed test (TestIndex.pl at line 27) not ok 6 - $% is indexed # Failed test (TestIndex.pl at line 27) not ok 9 - $( is indexed # Failed test (TestIndex.pl at line 27) not ok 10 - $) is indexed # Failed test (TestIndex.pl at line 27) not ok 11 - $* is indexed # Failed test (TestIndex.pl at line 27) ok 12 - $+ is indexed not ok 13 - $, is indexed # Failed test (TestIndex.pl at line 27) not ok 14 - $- is indexed # Failed test (TestIndex.pl at line 27) not ok 15 - $. is indexed # Failed test (TestIndex.pl at line 27) not ok 16 - $/ is indexed # Failed test (TestIndex.pl at line 27) not ok 17 - $0 is indexed # Failed test (TestIndex.pl at line 27) not ok 18 - $: is indexed # Failed test (TestIndex.pl at line 27) not ok 19 - $; is indexed # Failed test (TestIndex.pl at line 27) not ok 20 - $< is indexed # Failed test (TestIndex.pl at line 27) not ok 22 - $= is indexed # Failed test (TestIndex.pl at line 27) not ok 23 - $> is indexed # Failed test (TestIndex.pl at line 27) not ok 24 - $? is indexed # Failed test (TestIndex.pl at line 27) not ok 25 - $@ is indexed # Failed test (TestIndex.pl at line 27) not ok 26 - $[ is indexed # Failed test (TestIndex.pl at line 27) not ok 27 - $\ is indexed # Failed test (TestIndex.pl at line 27) not ok 28 - $] is indexed # Failed test (TestIndex.pl at line 27) not ok 29 - $^ is indexed # Failed test (TestIndex.pl at line 27) not ok 30 - $^A is indexed # Failed test (TestIndex.pl at line 27) not ok 31 - $^C is indexed # Failed test (TestIndex.pl at line 27) not ok 32 - $^D is indexed # Failed test (TestIndex.pl at line 27) not ok 33 - $^E is indexed # Failed test (TestIndex.pl at line 27) not ok 34 - $^F is indexed # Failed test (TestIndex.pl at line 27) not ok 35 - $^H is indexed # Failed test (TestIndex.pl at line 27) not ok 36 - $^I is indexed # Failed test (TestIndex.pl at line 27) not ok 37 - $^L is indexed # Failed test (TestIndex.pl at line 27) not ok 38 - $^M is indexed # Failed test (TestIndex.pl at line 27) not ok 40 - $^O is indexed # Failed test (TestIndex.pl at line 27) not ok 41 - $^P is indexed # Failed test (TestIndex.pl at line 27) not ok 42 - $^R is indexed # Failed test (TestIndex.pl at line 27) not ok 43 - $^S is indexed # Failed test (TestIndex.pl at line 27) not ok 44 - $^T is indexed # Failed test (TestIndex.pl at line 27) not ok 45 - $^V is indexed # Failed test (TestIndex.pl at line 27) not ok 46 - $^W is indexed # Failed test (TestIndex.pl at line 27) not ok 47 - $^X is indexed # Failed test (TestIndex.pl at line 27) not ok 51 - $ACCUMULATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 55 - $BASETIME is indexed # Failed test (TestIndex.pl at line 27) not ok 56 - $CHILD_ERROR is indexed # Failed test (TestIndex.pl at line 27) not ok 57 - $COMPILING is indexed # Failed test (TestIndex.pl at line 27) not ok 58 - $DEBUGGING is indexed # Failed test (TestIndex.pl at line 27) not ok 59 - $EFFECTIVE_GROUP_ID is indexed # Failed test (TestIndex.pl at line 27) not ok 60 - $EFFECTIVE_USER_ID is indexed # Failed test (TestIndex.pl at line 27) not ok 61 - $EGID is indexed # Failed test (TestIndex.pl at line 27) not ok 63 - $ERRNO is indexed # Failed test (TestIndex.pl at line 27) not ok 64 - $EUID is indexed # Failed test (TestIndex.pl at line 27) not ok 65 - $EVAL_ERROR is indexed # Failed test (TestIndex.pl at line 27) not ok 66 - $EXCEPTIONS_BEING_CAUGHT is indexed # Failed test (TestIndex.pl at line 27) not ok 67 - $EXECUTABLE_NAME is indexed # Failed test (TestIndex.pl at line 27) not ok 68 - $EXTENDED_OS_ERROR is indexed # Failed test (TestIndex.pl at line 27) not ok 69 - $FORMAT_FORMFEED is indexed # Failed test (TestIndex.pl at line 27) not ok 70 - $FORMAT_LINE_BREAK_CHARACTERS is indexed # Failed test (TestIndex.pl at line 27) not ok 71 - $FORMAT_LINES_LEFT is indexed # Failed test (TestIndex.pl at line 27) not ok 72 - $FORMAT_LINES_PER_PAGE is indexed # Failed test (TestIndex.pl at line 27) not ok 73 - $FORMAT_NAME is indexed # Failed test (TestIndex.pl at line 27) not ok 74 - $FORMAT_PAGE_NUMBER is indexed # Failed test (TestIndex.pl at line 27) not ok 75 - $FORMAT_TOP_NAME is indexed # Failed test (TestIndex.pl at line 27) not ok 76 - $GID is indexed # Failed test (TestIndex.pl at line 27) not ok 77 - $INPLACE_EDIT is indexed # Failed test (TestIndex.pl at line 27) not ok 78 - $INPUT_LINE_NUMBER is indexed # Failed test (TestIndex.pl at line 27) not ok 79 - $INPUT_RECORD_SEPARATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 80 - $LAST_MATCH_END is indexed # Failed test (TestIndex.pl at line 27) not ok 82 - $LAST_REGEXP_CODE_RESULT is indexed # Failed test (TestIndex.pl at line 27) not ok 83 - $LIST_SEPARATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 85 - $MULTILINE_MATCHING is indexed # Failed test (TestIndex.pl at line 27) not ok 86 - $NR is indexed # Failed test (TestIndex.pl at line 27) not ok 87 - $OFMT is indexed # Failed test (TestIndex.pl at line 27) not ok 88 - $OFS is indexed # Failed test (TestIndex.pl at line 27) not ok 89 - $ORS is indexed # Failed test (TestIndex.pl at line 27) not ok 90 - $OS_ERROR is indexed # Failed test (TestIndex.pl at line 27) not ok 91 - $OSNAME is indexed # Failed test (TestIndex.pl at line 27) not ok 92 - $OUTPUT_AUTO_FLUSH is indexed # Failed test (TestIndex.pl at line 27) not ok 93 - $OUTPUT_FIELD_SEPARATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 94 - $OUTPUT_RECORD_SEPARATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 95 - $PERL_VERSION is indexed # Failed test (TestIndex.pl at line 27) not ok 96 - $PERLDB is indexed # Failed test (TestIndex.pl at line 27) not ok 97 - $PID is indexed # Failed test (TestIndex.pl at line 27) not ok 100 - $PROCESS_ID is indexed # Failed test (TestIndex.pl at line 27) not ok 101 - $PROGRAM_NAME is indexed # Failed test (TestIndex.pl at line 27) not ok 102 - $REAL_GROUP_ID is indexed # Failed test (TestIndex.pl at line 27) not ok 103 - $REAL_USER_ID is indexed # Failed test (TestIndex.pl at line 27) not ok 104 - $RS is indexed # Failed test (TestIndex.pl at line 27) not ok 118 - $SUBSCRIPT_SEPARATOR is indexed # Failed test (TestIndex.pl at line 27) not ok 119 - $SUBSEP is indexed # Failed test (TestIndex.pl at line 27) not ok 120 - $SYSTEM_FD_MAX is indexed # Failed test (TestIndex.pl at line 27) not ok 121 - $UID is indexed # Failed test (TestIndex.pl at line 27) not ok 122 - $WARNING is indexed # Failed test (TestIndex.pl at line 27) not ok 123 - ${^WARNING_BITS} is indexed # Failed test (TestIndex.pl at line 27) not ok 124 - ${^WIDE_SYSTEM_CALLS} is indexed # Failed test (TestIndex.pl at line 27) not ok 125 - $| is indexed # Failed test (TestIndex.pl at line 27) not ok 126 - $~ is indexed # Failed test (TestIndex.pl at line 27) not ok 128 - %! is indexed # Failed test (TestIndex.pl at line 27) not ok 129 - %^H is indexed # Failed test (TestIndex.pl at line 27) not ok 130 - %ENV is indexed # Failed test (TestIndex.pl at line 27) not ok 131 - %INC is indexed # Failed test (TestIndex.pl at line 27) not ok 132 - %OVERLOAD is indexed # Failed test (TestIndex.pl at line 27) not ok 133 - %SIG is indexed # Failed test (TestIndex.pl at line 27) not ok 135 - *ARGV is indexed # Failed test (TestIndex.pl at line 27) not ok 165 - @+ is indexed # Failed test (TestIndex.pl at line 27) not ok 166 - @- is indexed # Failed test (TestIndex.pl at line 27) not ok 167 - @_ is indexed # Failed test (TestIndex.pl at line 27) not ok 165 - @+ is indexed # Failed test (TestIndex.pl at line 27) not ok 166 - @- is indexed # Failed test (TestIndex.pl at line 27) not ok 167 - @_ is indexed # Failed test (TestIndex.pl at line 27) not ok 169 - @INC is indexed # Failed test (TestIndex.pl at line 27) not ok 170 - @LAST_MATCH_START is indexed # Failed test (TestIndex.pl at line 27) not ok 171 - __DATA__ is indexed # Failed test (TestIndex.pl at line 27) not ok 172 - __END__ is indexed # Failed test (TestIndex.pl at line 27) not ok 173 - __FILE__ is indexed # Failed test (TestIndex.pl at line 27) not ok 174 - __LINE__ is indexed # Failed test (TestIndex.pl at line 27) not ok 175 - __PACKAGE__ is indexed # Failed test (TestIndex.pl at line 27) not ok 188 - and is indexed # Failed test (TestIndex.pl at line 27) not ok 190 - ARGV is indexed # Failed test (TestIndex.pl at line 27) not ok 191 - ARGVOUT is indexed # Failed test (TestIndex.pl at line 27) not ok 203 - AUTOLOAD is indexed # Failed test (TestIndex.pl at line 27) not ok 206 - BEGIN is indexed # Failed test (TestIndex.pl at line 27) not ok 227 - CHECK is indexed # Failed test (TestIndex.pl at line 27) not ok 256 - CORE is indexed # Failed test (TestIndex.pl at line 27) not ok 277 - DESTROY is indexed # Failed test (TestIndex.pl at line 27) not ok 297 - END is indexed # Failed test (TestIndex.pl at line 27) not ok 307 - eq is indexed # Failed test (TestIndex.pl at line 27) not ok 372 - ge is indexed # Failed test (TestIndex.pl at line 27) not ok 428 - gt is indexed # Failed test (TestIndex.pl at line 27) not ok 439 - INIT is indexed # Failed test (TestIndex.pl at line 27) not ok 464 - le is indexed # Failed test (TestIndex.pl at line 27) not ok 479 - lt is indexed # Failed test (TestIndex.pl at line 27) not ok 515 - ne is indexed # Failed test (TestIndex.pl at line 27) not ok 526 - NULL is indexed # Failed test (TestIndex.pl at line 27) not ok 534 - or is indexed # Failed test (TestIndex.pl at line 27) not ok 675 - STDERR is indexed # Failed test (TestIndex.pl at line 27) not ok 676 - STDIN is indexed # Failed test (TestIndex.pl at line 27) not ok 677 - STDOUT is indexed # Failed test (TestIndex.pl at line 27) not ok 792 - xor is indexed # Failed test (TestIndex.pl at line 27) # Looks like you failed 135 tests of 794.

Updated Steve_p - added readmore tags


In reply to Re: Perl index by diotalevi
in thread Perl index by szabgab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found