>There's no way for my aXML plugin to indicate a dependency on another plugin.

Well of the 58 currently defined plugins, only 2 have dependencies on others, and both of those refer to plugins which are part of the standard set.

Saying that I need to declare dependency on a plugin from the standard set is like saying that I need to predeclare the use of standard keywords in perl;

use use; use my; use foreach; foreach my $var (@vars) ...

Its nonsense.

Now if someone had a rare problem which they cannot solve with the standard set, and they decide what is needed is to write a brand new plugin, that plugin can depend on any of the standard set without any problems.

If they then write another plugin which depends on their first new plugin, and they try to share the second plugin with people without first sharing the first plugin, they are a moron and they deserve to be confused.... j/k come on reality check!

Also it would not be that hard to code it up so that plugins have version numbers, and can check that a given required dependency has the right version.

my $plugins = { foo => sub { our $version = '0.001'; ...do some tom-foo-lery... }, foo_bar => sub { our $version = '0.001'; if (defined $plugins->{'foo'}) { if ($plugins->{'foo'}->version ge '0.001') { ... do some foo-bar stuff ... my $var = $plugins->{'foo'}->("hello"); ... do some more foo-bar stuff ... return "result of foo-bar"; } return 'foo_bar error; please update foo'; } return 'foo_bar error; please install foo'; } };

I dunno why you would want to do it that way around tho when you could just as easily pass the result of foo to foo_bar at the aXML level.

<foo_bar><foo>hello</foo></foo_bar>

In reply to Re^22: Is an aXML compiler possible? by Anonymous Monk
in thread Is an aXML compiler possible? by Logicus

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.