Mike Blezien am Donnerstag, 14. September 2006 21:10:
> Hello,
>
> I'm working on making some modifications to a calendar script and haven't
> quiet figured out what the purpose of value of an assigned varilable
> $Template as it's used in various different places and assigned different
> value of some sort. What exactly is the purpose of the usage of the
> $Template variable or usage function .... not real clear on this. Hoping
> someone can clarify a bit.
>
> ##########################################################################
> # Code Snips ......
> # Read the main admin config file
> $admin_config = $BASE_DIR . "config.txt";
> $admin_config = $BASE_DIR . "config.txt";
> $AdminConfig = new ConfigFile($admin_config);
> $Template::AdminConfig = $AdminConfig;
>
> ..........................................
> $Session = new CGISession($BASE_DIR . "session/");
>
> ............................................
> # Make session available in template files
> $Template::Session = $Session;
>
> .................................................
> # Read the config file for the calendar
> $Config = new ConfigFile($config_file);
> $Template::Config = $Config;
> ................ and more code .......................
> #################################################
$Template::AdminConfig is a qualified variable name - referring to a global
variable $AdminConfig in the namespace (package) Template.
(analogous for the other variables).
There is no variable $Template.
Pseudo(!)code here: $(Template::AdminConfig).
Compare with $hash{key}, where the '$' denotes the type of 'hash{key}' and
not 'hash'.
Hope this helps
Dani
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>