Agreed, maybe i was'nt precise enough i my statement:

I do not find the fact that i include a "use" declaration for new functionality suprising, this is i what i normally expect and want.

Also i maybe did'nt provide enough information about the the context of the "application" i was writing: a "little" monitoring daemon. The function,which instanciates the objects, does this by reading from file and instanciates them by parsing the input from the file, something like the following:

sub load { my ($self, $filename) = @_; open (LOGGERS, "< " . $filename); my ($line); while ($line = <LOGGERS>) { chomp $line; if (!$line) { last;} my @parms = split /:/, $line; my $loggertyp = shift @parms; my $logger = ${loggertyp}->new(); $logger->systemname($self->systemname); $logger->subject($self->subject); while (@parms) { my $parmtyp = shift @parms; my $parmvalue = shift @parms; ${logger}->${parmtyp}($parmvalue); } $self->loggers($logger); } close(LOGGERS); }

It actually knows nothing about "functionality" it makes available.

In this context it would be a great thing, if i just could write a new perl module, change the file and the tell the daemon through some signal, to newly load the file and the "daemon" executes new functionality,granteed the whole thing is well tested etc. With the "use" declarations, i additionally have to stop the "daemon" and change the source code of this module. So that's the reason, that in this context, i would prefer not be be explicit.

Chris

In reply to Re: ?Re: Generic Composite Interface by chhe
in thread Generic Composite Interface by chhe

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.