Hi everyone.
I am just looking for clarification on a scope issue.
I have my perl file which is writing some XML based on some inputs. I have got a whole bunch of default values in a .pm file.
For info my script is called VO_delivery.pl
and my package is called VO_delivery_xml_config.pm
In my main script i am using
Then when i use a variable from the package it is in the following form:
for a variable called outputFolder
In the package file is it correct to use 'our' for the variable declaration or should i use 'my'.
I have looked at the documentation on this and i think this is the right way to do it, but not sure.
Any tips on this or even links to a good explanation of scope would be greatly appreciated.
Thanks,
Jez
I am just looking for clarification on a scope issue.
I have my perl file which is writing some XML based on some inputs. I have got a whole bunch of default values in a .pm file.
For info my script is called VO_delivery.pl
and my package is called VO_delivery_xml_config.pm
In my main script i am using
Code:
use strict;
use VO_delivery_xml_config;
Then when i use a variable from the package it is in the following form:
Code:
$VO_delivery_xml_config::outputFolder;
In the package file is it correct to use 'our' for the variable declaration or should i use 'my'.
I have looked at the documentation on this and i think this is the right way to do it, but not sure.
Any tips on this or even links to a good explanation of scope would be greatly appreciated.
Thanks,
Jez