in reply to Code Reuse

I've read the comments here, and the comments in the attached post regarding the same.

My conclusion is this: There is no comfortable and/or smart way to this as opposed to C++. Some code might be saved, but it is simply not entirely feasible.

My requirements were:

* Shared 'use' statements in the file scope

* Shared 'our' variables in the file scope

* Shared 'libs' in the file scope

+ A system that checks the possibility of a connectivity fault in one of the packages.

How smart/code-wise/good habit this request is a matter of taste and not relevant in my beliefs.

Replies are listed 'Best First'.
Re^2: Code Reuse
by LanX (Saint) on Aug 28, 2017 at 16:00 UTC
    You got very good answers for a not very well formulated question, partly also because most of us are not C++ users.

    What for instance is "connectivity fault" supposed to mean? see How do I post a question effectively?

    But if you thing C++ is better, go on use it ...

    Probably we should lead you to Source-Filters and let you have fun there, like Filter::Include, instead suggesting more stable approaches?

    EDIT

    and please note that you can easily compile your own Perl version with C like pre-processor support

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!