Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: GLOB reference problem

by almut (Canon)
on Oct 05, 2009 at 12:30 UTC ( [id://799239]=note: print w/replies, xml ) Need Help??


in reply to Re^4: GLOB reference problem
in thread GLOB reference problem

Net::FTP's constructor calls IO::Socket::INET, which calls IO::Socket, which in turn calls IO::Handle. And IO::Handle uses gensym to create the glob.

In other words, if you wanted to fake a (totally functionless!) object of same type, you could try:

#!/usr/bin/perl my $ftp = Net::FTP::Faked->new(); print "$ftp\n"; # Net::FTP=GLOB(0x63c430) package Net::FTP::Faked; use Symbol; sub new { my $ftp = gensym; bless $ftp, "Net::FTP"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found