Accessing main:: from within a package

[prev] [thread] [next] [Date index for 2005/05/27]

From: Ken Clarke
Subject: Accessing main:: from within a package
Date: 01:30 on 27 May 2005
Hi Folks,

    With the release of mod_perl 2 (all say "Yeah Stas!" :) I decided to 
dive in.  It'll be a change of mindset for me since I've coded perl scripts 
for mod_cgi for years.

    I have a library of perl modules which occasionally make reference to 
package main:: (EG $main::ScriptGlobalHash{'hashkey'} or my $result = 
&main::SomeSubroutine(\%args))  However, if my understanding of the docs is 
correct, my "main" script now belongs to a request URL specific package 
namespace.  How should I properly (read safely/portably) refer to my "main" 
package?  Put another way, how should my packages refer to variables, 
subroutines, handles etc which belong to the "top level script".

    Your time is appreciated.

>> Ken


Accessing main:: from within a package
Ken Clarke 01:30 on 27 May 2005

Re: Accessing main:: from within a package
Stas Bekman 03:21 on 27 May 2005

Re: Accessing main:: from within a package
Perrin Harkins 14:18 on 27 May 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52