> Additionally: I'm not extremely surprised if other implementations mirror the details of the builtin glob as far as their behaviors go.
Tho I don't even know how to generate a test-suite for that.
It's mind-blowing
- alterations can be nested
- "nested" character classes do not exist but what are the exact escaping rules then?
- how do you test globing on filenames which a particular file-system doesn't allow °
- escaping of "glob-metas" must be reflected on "re-metas" and vice versa
- how do you test that no unintened re-meta was injected, without being escaped?
- I just noticed that Text::Glob translates {x,y} to (x|y) which means you get capture groups as a side effect.
There is more for sure ...
°) a quick test on Windows
DB<152> open my $fh ,">", "$_" or say "ERROR:'$_' $!" for qw/~ [ ]
+ { } * ?/
ERROR:'*' Invalid argument
ERROR:'?' Invalid argument
DB<153> x <?>
0 '['
1 ']'
2 '{'
3 '}'
4 '~'
DB<154>
see also this SO answer: what-characters-are-forbidden-in-windows-and-linux-directory-names
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.