in reply to Re: import() not getting called. Huh?
in thread import() not getting called. Huh?

I think you're counting the documentation lines, not the code. The module (with internal comments but not the manual in the attached POD) is under 400 lines.

I'm sorry you find it excessively complicated. I thought it was elegant and to the point for the task it is documented as accomplishing.

The interface has been well-received, in fact. See the replies to the original design draft at Module Design strawman - Exporter::VA. If you have any serious suggestions to improve it, I'm all ears.

—John

  • Comment on Re: Re: import() not getting called. Huh?

Replies are listed 'Best First'.
Re: Re: Re: import() not getting called. Huh?
by MarkM (Curate) on Dec 21, 2002 at 06:49 UTC

    I'm counting lines of *.pm and *.perl. I think the problem I have with your code is that it is very difficult to read. The indenting scheme is extremely odd, and inlined comments do not describe the code flow.

    To me, the idea of modules having fine-grained interface versioning, while cute, is heavy-weight. I prefer simpler modules that provide backwards compatible methods, or are renamed when the functionality or interface is changed substantially enough to require a new interface. The potential for a single module to provide 50 different interfaces to its caller, depending on how it is included, presents a regression testing nightmare in my books.

    If the interface needs to change substantially enough that compatibility methods are insufficient, either the module was not designed properly in the first place, or the module deserves a new name. In either case, the various intermediate interfaces should be obsoleted as soon as possible to prevent confusion.

      My motivation is to be able to remove default exports in updated modules. True, changing the functionality can be handled by changing the name, but I want to be able to clean up modules that export by default.

      Re: inlined comments do not describe the code flow, can you be more specific?

      —John

        The method used by such people as Tom Christiansen to avoid importing names by default, is to avoid use of the default export mechanism altogether. Import the names you need, or else live with the chance that too many names are imported.

        Re: inlined comments do not describe code flow, I mean that the comments do not provide me additional insight into understanding the code flow. It may be that adjusting the indenting scheme to use a more common strategy would drastically reduce the apparent complexity. My opinion is only based on the fact that I am accustomed to reading code, and I could not easily follow your code. This may mean that your code is too advanced for me, or it may mean that your code is difficult to read. Take it how you wish. I tried to find your problem, and I became lost.