From: John H. <jo...@gr...> - 2003-11-14 22:25:38
|
It's global in that if the autohandler is placed correctly, ie. on the root level, then all other components will reference it. As for it actually being a global, read this section of the book: http://www.masonbook.com/book/chapter-3.mhtml#TOC-ANCHOR-5 Specifically the paragraph that says: "Note that the $dbh variable was not declared with my() in either component, so it should be declared using the Mason allow_globals parameter (or, equivalently, the MasonAllowGlobals directive in an Apache config file). The allow_globals parameter tells the compiler to add use vars statements when compiling components, allowing you to use the global variables you specify. This is the easiest way to share variables among several components in a request, but it should be used sparingly, since having too many global variables can be difficult to manage." John Halladay Green Aspen, Inc. Web Development - Server Admin - Hosting - Consulting Be sure to visit us at www.greenaspen.com! -----Original Message----- From: mas...@li... [mailto:mas...@li...]On Behalf Of Anthony Ettinger Sent: Friday, November 14, 2003 3:06 PM To: mas...@li... Subject: [Mason] is autohandler global? I apologize for my newbie-ness. Are variables in 'autohandler' global to all components? I have in autohandler: <%init> local $user_info = ... </%init> and the other components are accessing it. It appears to be global to me, and I'm wondering if only <%init> variables are global, or are all the variables in 'autohandler' global? Thanks. ===== Anthony Ettinger apw...@ya... http://www.apwebdesign.com Instant Messengers: 1) yahoo im: apwebdesign 2) aol im: apwebdesignxl 3) msn im: apw...@ho... 4) icq im: 659139 __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ Mason-users mailing list Mas...@li... https://lists.sourceforge.net/lists/listinfo/mason-users |