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"; }
|
---|
In Section
Seekers of Perl Wisdom