in reply to File::HomeDir strange behavior Perl 5.28

I can't confirm that behaviour with my own installation of Strawberry Perl 5.28 which returns C:\Users\USER\AppData\Local as expected. But your result has been the behaviour of the Portable edition with both Perl 5.24 and Perl 5.28 - so maybe you unfortunately caught a portable one to c:\Strawberry? The file README.txt in that directory could provide more information.

  • Comment on Re: File::HomeDir strange behavior Perl 5.28

Replies are listed 'Best First'.
Re^2: File::HomeDir strange behavior Perl 5.28
by IB2017 (Pilgrim) on Nov 01, 2018 at 11:54 UTC

    Thank you. Yes, I checked and my 5.28 is a portable edition (berrybrew ).

Re^2: File::HomeDir strange behavior Perl 5.28
by Anonymous Monk on Nov 02, 2018 at 09:15 UTC

    Does this mean that berrybrew is a bat choice as it uses the portable versions?

      When trying with Strawberry (portable),
      perl -MFile::HomeDir -e "print $File::HomeDir::IMPLEMENTED_BY;"
      gives me Portable::HomeDir

      If I remove/rename said module (...\perl\vendor\lib\Portable\HomeDir.pm), I get the expected File::HomeDir::Windows.

      It might make sense for berrybrew to do this locally.

      (Update: crossposted to https://github.com/stevieb9/berrybrew/issues/121)

        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.

        The question is if it will break someway the Perl installation...