[cgiapp] code reuse.

Mark Fuller azfuller at gmail.com
Mon Mar 17 16:07:02 EDT 2008


On Mon, Mar 17, 2008 at 1:00 PM, James.Q.L <shijialeee at yahoo.com> wrote:
>  i think you are right. it is fine as long as the global variable is explicitly initialized.

No problem. So, what I was thinking is that you could initialize the
"our $uuid" with specific method you'd call from cgiapp_init (like
initialize_uuid). After that you can access $uuid as
$Company::Module_name::uuid from anywhere.

That's what I was trying to describe. It might be better to create an
accessor method like Michael suggested.

>  i have asked a question on perlmonks with a better example. see
>  http://perlmonks.org/?node_id=674601

Thanks. I'll follow that.

Mark


More information about the cgiapp mailing list