in reply to Re^3: File::HomeDir strange behavior Perl 5.28
in thread File::HomeDir strange behavior Perl 5.28

Thanks for the issue report, soonix!

I'm a bit confused as to what is desired for berrybrew here. Are you wanting berrybrew to point to C:\Users\USER\AppData\Local, or portable_install_path\data?

What do people thinks makes more sense?

Since I'm honestly only a Windows user in rare cases (testing my own software, mostly, and, well, developing berrybrew ;), I'm not sure of the benefits of either way.

In either case, if people thinks it would be better to have an option to return all portable editions in berrybrew back to the default File::HomeDir on each install, I'm all ears. That said, I would make it user configurable via a config file directive, where the current method is default, and the user would have to set a flag to have the Portable functionality removed (and it would be global, occurring after each install of a new instance).

I suppose I could add a new berrybrew install x.xx -win_home or some such flag as well so that each install could be customized, if you think that makes sense. In any case, it would have to be non-intrusive to the user.

Replies are listed 'Best First'.
Re^5: File::HomeDir strange behavior Perl 5.28
by soonix (Chancellor) on Nov 02, 2018 at 20:28 UTC
    I think I'd prefer berrybrew removing the Portable::HomeDir by default. However, CPAN and cpanm both use File::HomeDir->my_home, which means it would be difficult to have different configs for different versions. This probably would only be a minor gotcha, but I see the impact would be greater than what I thought when I wrote this. A config directive is definitely a good idea.

      This is exactly why I wanted to hash this out in a public forum, to get as much feedback, criticism and "ohhh, I forgot about that angle!" comments that I can before I make a change.

      I don't like it when I'm too quick to implement something that I'll be kicking myself in the ass for in three months.

      Very good feedback so far here, I appreciate it all.

        I am not an expert user at all, but this is my experience so far removing (...\perl\vendor\lib\Portable\HomeDir.pm). In order to have <code>File::HomeDir->my_data giving me back the real Windows thing, my Perl installation has the following problem: installing new modules fires error: a new folder strawberry is created under C: where cpan or cpanm try to install the modules, failing. To get modules installed I have to recreate the original (...\perl\vendor\lib\Portable\HomeDir.pm).