objects and code references

From: Jeff Thies (nospam_at_nospam.net)
Date: 06/28/04


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



Relevant Pages

  • RXParse module v.91 (by robic0)
    ... # Unicode character reference ... sub original_content ... then call content handler with $content ...
    (comp.lang.perl.misc)
  • Re: Emailing a Report
    ... make sure you have a reference to a Microsoft DAO Library ... The Sub LoopAgmtsSendEmail is highlighted by the Debugger. ... 'pSQL -- defines the recordset to open ... You must remember to enclose literal values in quotes and concatenate them; the final string must have commas too, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Please help me clarify these byVal vs. byRef subtleties
    ... ByVal & ByRef Parameters are independent of Reference & Value Types. ... > I've got a class, DataHider, with one private string field (i.e., ... > Public Sub callObjectMethodPassedByVal(ByVal myObj As ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Shared Method Problem With "Global" Storage
    ... a routine in Module1 which then calls code back in Form1 ... ButtonHasBeenClicked but the reference to ButtonHasBeenClicked ... instance member of a class from within a shared method or shared ... In a shared Sub, you can not access an instance field withouth ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Auto Load Add-In
    ... you posted that will unload the addin. ... Sub ListAddins() ... Dim adn As AddIn ... I also assume the reason you want to add a project reference to the addin to ...
    (microsoft.public.excel.programming)