如何在不擦除 \perl\site\lib\ 和 \perl\site\bin\ 的情况下升级 Strawberry Perl?
我下载了 5.12.3 安装程序来升级 5.12.1 安装。安装5.12.3后,我之前安装的cpan模块消失了。这是预期的行为吗?我应该在升级之前备份我的库以防止这种情况发生吗?
I downloaded the 5.12.3 installer to upgrade my 5.12.1 installation. After installing 5.12.3, my previously installed cpan modules are gone. Is this expected behavior? Should I be backing up my library before upgrading to prevent this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这不应该预期的行为。
site
目录不是标准发行版的一部分,发行版不应触及它们。哎呀,这就是site
目录存在的原因。否则,为什么不简单地将所有模块下载到同一目录中呢?为什么要区分标准 Perl 模块和从 CPAN 下载的模块?当我的个人模块(不属于 CPAN 的模块)被我的 Strawberry Perl 升级所震撼时,我也艰难地发现了这一点。 ActivePerl 做得对——不仅没有触及
site
目录,而且还将 Perl 版本添加到标准模块目录和站点目录中。I would claim that this should not be expected behavior.
The
site
directories are not part of the standard distribution and should not be touched by the distribution. Heck, it's even why thesite
directories even exist. Otherwise, why not simply download all of the modules to the same directory? Why make a distinction between the standard Perl modules and the modules you download from CPAN?I too found this out the hard way when my personal modules -- modules that are not part of CPAN -- were blown away by my upgrade of Strawberry Perl. ActivePerl does it right -- not only not touching the
site
directory, but also adds in the Perl version to the standard module directory and the site directory.这是预期的行为。下次您可以使用 CPAN 客户端的“自动捆绑”功能时,它将创建模块列表/捆绑包,以便在新版本中使用 CPAN 客户端重新安装。
It is expected behavior. Next time you can use "autobundle" feature of CPAN client, it will create list/bundle of modules to reinstall using CPAN client in new version.