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

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

问题描述

全局符号需要显式的程序包名称吗?为什么会发生这种情况?哪些情况下会导致此错误?

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"或"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天全站免登陆