全局符号需要明确的包名 [英] Global symbol requires explicit package name

查看:18
本文介绍了全局符号需要明确的包名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全局符号需要明确的包名?为什么会发生这种情况,有哪些不同的情况会导致此错误?

Global symbol requires explicit package name? Why has this occurred and what are various cases that can cause this error?

推荐答案

看看 perldiag:

全局符号%s"需要明确的包名

(F) 你说过使用严格"或use strict vars",这表明所有变量必须是词法范围的(使用my"或state"),使用our"预先声明,或者明确限定说明全局变量是哪个包在(使用::").

(F) You've said "use strict" or "use strict vars", which indicates that all variables must either be lexically scoped (using "my" or "state"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::").

这篇关于全局符号需要明确的包名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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