Perl 的哪一部分不喜欢 NTFS 连接点?

发布于 2024-11-02 17:07:07 字数 701 浏览 4 评论 0原文

我喜欢 Vista 风格的路径,因此在 XP 计算机上我创建了 NTFS 连接 C:\Users -> C:\Documents and Settings~\Documents -> ~\My Documents,这样我只需编写一种样式的路径C:\Users\me\Documents

但是,当我将 PERL5LIB 设置为 'C:\Users\me\Documents\dev\perl\lib' 时,CPAN::SQLite 和 Exporter 的配合非常困难。Exporter 的Exporter 继承的模块在尝试使用 export_to_level 时开始抱怨未定义。

我真的认为这是 Exporter 等人,而 CPAN::SQLite 只是受害者,因为它导入 $dbh< use 语句中的 /code> 符号,只会让 perl 抱怨 $dbh 未定义。除此之外,XS 相关模块抱怨没有“引导”方法。

那么有人知道 Perl (Strawberry) 是否对 NTFS 连接有特殊问题吗?

I like the Vista style for pathing, so on a XP machine I've created NTFS junctions C:\Users -> C:\Documents and Settings and ~\Documents -> ~\My Documents, so that I only ever have to write one style of path C:\Users\me\Documents.

However, CPAN::SQLite and Exporter have a hairy fit when I set PERL5LIB to 'C:\Users\me\Documents\dev\perl\lib'. Exporter's Modules that inherit from Exporter start complaining that export_to_level is not defined when they try to use it.

I really think it's Exporter et al., and CPAN::SQLite is just a victim, because it imports the $dbh symbol in the use statement, only to have perl complain that $dbh was not defined. On top of this, XS-related modules complain that there is no 'bootstrap' method.

So does any one know if Perl (Strawberry) has a particular problem with NTFS Junctions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丘比特射中我 2024-11-09 17:07:07

这与其说是一个后续问题的答案:我无法重现该问题。所以我无法可靠地复制错误消息。这不仅仅是重启。因为我做了好几个这样的事。

我将 PERL5LIB 改回“C:\Documents and Settings\me\My Documents\...”,运行了一些 Perl,结果就是这样必须如此。

然后我在评论中阅读了 ikegami 的问题,并将 Windows 设置更改回 C:\Users\me\Documents\...\perl\lib 并且 Perl 仍然运行良好 - CPAN 也是如此。我重新启动,确保环境变量是由连接名称设置的,并且 Perl 和 CPAN 仍然运行良好。

自从我发布这个问题以来的几周内,我再也没有遇到过这个问题。现在这是我运行的 perl 环境:

C:\blahblahblah>perl -MSmart::Comments -MCPAN::SQLite -e "### @INC"

### @INC: [
###         'c:/Users/<me>/Documents/.../perl/lib',
###         'C:/strawberry/perl/site/lib',
###         'C:/strawberry/perl/vendor/lib',
###         'C:/strawberry/perl/lib',
###         '.'
###       ]

事情是,在运行“旧方式”时,我可能重新组织了我的个人 perl/lib 以消除另一个问题。

但我认为答案是,从长远来看,Strawberry Perl 可能在 NTFS 连接方面没有任何问题。

This is not so much an answer bu a follow-up: I could not recreate the problem. So I can't reliably replicate the error message. It wasn't just a reboot. Because I did several of those.

I changed my PERL5LIB back to "C:\Documents and Settings\me\My Documents\..." ran some Perl fine, and just settled that that was the way it had to be.

Then I read ikegami's question in the comments and changed the Windows setting back to C:\Users\me\Documents\...\perl\lib and the Perl still ran fine--so did CPAN. I rebooted making sure that the environment variable was being set by the Junction names, and still perl and CPAN ran fine.

In the weeks since I've posted this question, I've never seen the problem again. And now here's the perl environment I run in:

C:\blahblahblah>perl -MSmart::Comments -MCPAN::SQLite -e "### @INC"

### @INC: [
###         'c:/Users/<me>/Documents/.../perl/lib',
###         'C:/strawberry/perl/site/lib',
###         'C:/strawberry/perl/vendor/lib',
###         'C:/strawberry/perl/lib',
###         '.'
###       ]

Thing is that in running the "old way", I might have reorganized my personal perl/lib to eliminate another problem.

But I think the answer is that it is likely Strawberry Perl has NO problems with NTFS Junctions...in the long run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文