objects and code references
From: Jeff Thies (nospam_at_nospam.net)
Date: 06/28/04
- Next message: Joe Smith: "Re: PPT UNIX Reconstruction Project at: http://www.perl.com/language/ppt/"
- Previous message: Joe Smith: "Re: Logfile scanning assistance"
- Next in thread: Tassilo v. Parseval: "Re: objects and code references"
- Reply: Tassilo v. Parseval: "Re: objects and code references"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Jun 2004 04:44:32 GMT
I've created an object with a method like this:
use File::Find;
sub someSub{
my $self=shift;
find(\&wanted,'some_directory');
...
}
I need for the wanted sub to read some of the object properties. I'm unsure
how to do this.
I can't do this:
find(\&$self->wanted,...)
and I can't do this:
find(\&wanted($self->{some_property}),...
So, what do I do?
Can I make a reference to $self->wanted? Looks like I've come to the point
where I need to understand that "&" and references to subs.
Cheers,
Jeff
- Next message: Joe Smith: "Re: PPT UNIX Reconstruction Project at: http://www.perl.com/language/ppt/"
- Previous message: Joe Smith: "Re: Logfile scanning assistance"
- Next in thread: Tassilo v. Parseval: "Re: objects and code references"
- Reply: Tassilo v. Parseval: "Re: objects and code references"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|