in reply to Re^5: Which internal DSL are there in Perl? (Domain Specific Languages - Part 1)
in thread Which internal DSL are there in Perl? (Domain Specific Languages - Part 1)

Another way is using a (very safe) Source Filter, which is just introducing a package XYZ; line and memorizing the original package and switching back in an unimport.

use My::DSL; ... DSL logic ... no My::DSL;

keep in mind that there is still this %^H hint-hash mechanism for lexically scoped exports.

See perlpragma , though the routines are not really unimported they are just aware about the correct scope.

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

Replies are listed 'Best First'.
Re^7: Which internal DSL are there in Perl? (Domain Specific Languages - Part 1)
by shmem (Chancellor) on Aug 04, 2017 at 21:23 UTC
    See perlpragma, though the routines are not really unimported they are just aware about the correct scope.

    Yes, that's a good way to go. There are so many paths, so much OWTDI, and to get a good one, so many things want to be thinked about... Thanks.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'