大佬教程收集整理的这篇文章主要介绍了如何将包符号导出到Perl中的命名空间?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
#!/usr/bin/perl package mod; use Strict; use warnings; require Exporter; @ISA = qw(Exporter); @EXPORT=qw($a); our $a=(1); 1;
test.pl
$cat test.pl #!/usr/bin/perl use mod; print($a);
这是运行它的结果
$./test.pl Global symbol "@ISA" requires explicit package name at mod.pm line 10. Global symbol "@EXPORT" requires explicit package name at mod.pm line 11. Compilation failed in require at ./test.pl line 3. BEGIN failed--compilation aborted at ./test.pl line 3. $perl -version This is perl,v5.8.4 built for sun4-solaris-64int
以上是大佬教程为你收集整理的如何将包符号导出到Perl中的命名空间?全部内容,希望文章能够帮你解决如何将包符号导出到Perl中的命名空间?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。