Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: access to the variable in other pm

by blazar (Canon)
on Feb 03, 2006 at 11:50 UTC ( [id://527601]=note: print w/replies, xml ) Need Help??


in reply to Re: access to the variable in other pm
in thread access to the variable in other pm

make sure your module 1 exports the symbol you want

Well, not necessarily: he may write accessory subs to be used like methods and call them... ehm, like methods. This may be either an overkill or The Best Way™ depending on the actual purpose, scope and aim of his code. But indeed your suggestion is more akin to what the OP actually asked. As a side note, I'd just add

use base 'Exporter'; our @EXPORT = qw($dbaccess); # hey, I always C<use strict;> at the ve +ry top!

as another, fundametally identical - but somewhat more modern, "WTDI".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://527601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found