如何重建已下载的经过编辑的Perl6模块? [英] How can I rebuild an edited perl6 module that I've downloaded?

查看:83
本文介绍了如何重建已下载的经过编辑的Perl6模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Time :: Duration,但它的大多数测试均未通过.我希望能够通过本地存储的模块重建模块-并进行编辑.

I've installed Time::Duration and it failed most of its tests. I want to be able to rebuild the module - with my edits - from the locally stored module.

我编辑了包含模块的文件(对应于Duration.pm6):

I edited the file that contains the module (that corresponds to Duration.pm6):

~/.perl6/sources/D00C101A0157E3EAC494310C9961F299240423E7

然后尝试通过其json文件进行构建:

And then try building via it's json file:

zef --debug build ~/.perl6/dist/83839D8D315EEDEDFEAF211EE42E8D936ACE29CB

这将返回:

===> # SKIP: No need to build Time::Duration:ver<2.00>
!!!> Build failure: ~/.perl6/dist/83839D8D315EEDEDFEAF211EE42E8D936ACE29CB at ~/.perl6/dist

我希望这将使用对源代码所做的更改来重建模块.

I was hoping that this would rebuild the module with the change I made to the source.

我做错了,还是我完全错了?

Have I done this wrong, or am I going about this entirely wrong?

推荐答案

已经注意到,您不应修改已安装的文件.但是,测试某些模块更改的工作流程非常简单.

As it has been noted already you should not modify installed files. However, the workflow for testing changes of some module is pretty straight forward.

第一:

# Fetch and extract the distribution, then change into its directory.
# If the distribution is still in zef's local file cache then it will
# skip the fetch and extraction steps.

zef look Time::Duration

然后:

此时,您可以编辑所需的任何文件.

At this point you can edit any of the files you wish.

最后:

# test your changes without reinstalling (assumes all dependencies are installed)
zef test .

# Reinstall the modified version of Time::Duration using one of the following:
zef install . --force-install
zef uninstall Time::Duration && zef install .

这篇关于如何重建已下载的经过编辑的Perl6模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆