Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Announcing XML::Parser::Nodes

by tqisjim (Beadle)
on Oct 04, 2012 at 23:19 UTC ( #997346=perlquestion: print w/replies, xml ) Need Help??
tqisjim has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I just uploaded an extension to XML::Parser. I'm not sure there's a big demand for XML solutions right now. I originally wrote this 8 or 9 years so do something practical with the XML::Parser::Tree output, but I've only just started learning to publish and promote my work.

I have a question, too:

I would like to implement my module so that a user can get an instantiation as follows:

my $nodes = new XML::Parser Style => 'Nodes'

It seems like I need to add the following definition to my module:

$XML::Parser::Built_In_Styles{Nodes} = 1 ;
I thought this was a big breakthrough so I could perform various searches based in XML::Parser::Built_In_Styles but nothing seems to come up.

Keep the cards and letters coming, it's always nice to hear from others in this group.

Replies are listed 'Best First'.
Re: Announcing XML::Parser::Nodes
by tqisjim (Beadle) on Oct 07, 2012 at 00:21 UTC

    This relates a question about how CPAN assigns names: XML::Parser, for example, defines a namespace which could represent one of any of the following:

    1. A module that uses its namespace for private modules to comprise a larger solution.
    2. A package that defines a general topic- modules within the namespace generally relate to the topic, but are otherwise unrelated to each other.
    3. An interface whose namespace contains implementation modules.

    Perl doesn't have any explicit declaration to distinguish one approach from the other. But XML::Parser is implemented as the last approach. And the Built_In_Styles member seems to be merely notational, not functional.

    In fact, any module that shares the XML::Parser namespace can be invoked as a Style argument. I merely had to add some handler wrappers to get the desired output.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://997346]
Approved by Tanktalus
Front-paged by Corion
and the monastery is silent...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-03-21 15:06 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (268 votes). Check out past polls.