Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Hi, this API is lacking. You're modifying state and expecting it to get used elsewhere and maybe it or maybe it won't or maybe something else now will fall over because things are possibly "strange."

    Further, there's little reason for a user to think that loading something that looks like a class isn't going to be the normal sort of idempotent action we normally expect "Yes please, this I require that class X be loaded".

    Quite sure this use of use() ought to look unlike a regular class-loading use of use(). Or the class loading could load HomeDir but replace it's environmental db with something custom?

    Perhaps something like:

    sub import {
        $File::HomeDir::ENV = {
            %main::ENV,
            HOME => ...
        };
    }