Well, but .... (there is allways a 'but') :-)
Suppose I do not subclass XML::Parser.
But then, how do I pass parameters to XML::Parser handler methods
and collect results of their run without using global
variables of XML::Parser package? Only class that I get
to handler methods is expat itself and there is no place for
any aditional parameters/results of handler methods.
And if I subclass XML::Parser, only advantage that I gain is
using my own package namespace for global variables instead
of XML::Parser's namespace. This do not looks to me like a good
example of object oriented programming style.
Possible silution is the one mirod suggested using Non-Expat-Options
but it is just a little bit less ugly than these two.
There best solution will be forcing XML::Parser to use
my custom subclass of XML::Parser::Expat instead of XML::Parser::Expat itself.
Is there some way how to do that?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||