--- Peter Cline <[EMAIL PROTECTED]> wrote:>
> >ok, so the routine is in main:: namespace?
>
> Is it? Does require put its arguments into the namespace from which
> it was called?
Yep, I think so.
require 'x.pl';
is much the same as
eval `cat x.pl`;
Yes?
> > > use NYT::Cnxdb;
> > > my $c
>
>ok, so the routine is in main:: namespace?
Is it? Does require put its arguments into the namespace from which it was
called?
> > use NYT::Cnxdb;
> > my $cnxdb =
> > Cnxdb->new($conf{cnxdbUser},$conf{cnxdbPort},$conf{cnxdbTimeout});
> > die("Unable to connect to database: " . $cnxdb->getla
--- Peter Cline <[EMAIL PROTECTED]> wrote:
> At 01:29 PM 5/23/01 -0700, you wrote:
> >I'm not sure what you mean by "multiple namespaces". Could you
> >elaborate?
>
> I am writing a module. This module has numerous packages which are
> what I am referring to (perhaps erroneously) as namespaces
At 01:29 PM 5/23/01 -0700, you wrote:
>I'm not sure what you mean by "multiple namespaces". Could you
>elaborate?
I am writing a module. This module has numerous packages which are what I
am referring to (perhaps erroneously) as namespaces. In this module file
is a use pragma/function that t
--- Peter Cline <[EMAIL PROTECTED]> wrote:
> > > my $object = Class->new( );
> >
> > Looks ok. Can you access the objects methods thereafter in that
> > scope?
>
> Yes, I can access object methods anywhere in the file in which I
> created the object even though it has multiple namespaces.
I
At 12:00 PM 5/23/01 -0700, Paul wrote:
> $object->method()
>passes $object to method much like
> Namespace::method($object);
Of course! I've been building perl objects over the last few days and taken
advantage of that property of method calls (obviously), but had forgotten.
> > my $object =
--- Peter Cline <[EMAIL PROTECTED]> wrote:
> Now I'd like to know if it is possible to pass an object as an
> argument to subroutine.
object method calls always do. =o)
$object->method()
passes $object to method much like
Namespace::method($object);
> I tried doing this as follows:
> in one
Thanks for all the responses to my question regarding deferencing a hash
reference which in turn references an array. I decided to use the arrow
operator.
Now I'd like to know if it is possible to pass an object as an argument to
subroutine. I tried doing this as follows:
in one file, the o