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 reply to Re^5: GLOB reference problem
by almut
in thread GLOB reference problem
by jerryhone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |