Exporting Constants in Perl

Andrew Hammond ahammond-swQf4SbcV9C7WVzo/KQ3Mw at public.gmane.org
Fri Jun 17 14:40:29 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I just tried it with "our" instead of "use subs" and it works...but why?
> 
> use subs @EXPORT_OK;
> becomes
> our @EXPORT_OK;
> 
> I assume the problem is that use subs only expects subs to be exported.
> So should I always use our?  Does use subs offer any benefits over our?
> Now my file works, but I just want to know what is the correct syntax
> and why. 

Chapter 4 of the camel book will enlighten you.

- --
Andrew Hammond    416-673-4138    ahammond-swQf4SbcV9C7WVzo/KQ3Mw at public.gmane.org
Database Administrator, Afilias Canada Corp.
CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCsuDcgfzn5SevSpoRAlRqAKCauSWRkzY8wxSPJQyo9Ia0nAZE7ACgoDqI
Ctm7LqZC/ptT7AJTc8XoSus=
=N9l6
-----END PGP SIGNATURE-----
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list