Here is the problem I'm experiencing
Undefined subroutine &Net::FTPServer::InMem::FileHandle called at /usr +/local/share/perl/5.18.2/Net/FTPServer/InMem/DirHandle.pm line 274, < +STDIN> line 6. at /usr/local/share/perl/5.18.2/Net/FTPServer.pm line 2368, <STDIN> l +ine 6. Net::FTPServer::__ANON__('Undefined subroutine &Net::FTPServer::In +Mem::FileHandle calle...') called at /usr/local/share/perl/5.18.2/Net +/FTPServer/InMem/DirHandle.pm line 274 Net::FTPServer::InMem::DirHandle::list_status('Net::FTPServer::InM +em::DirHandle=HASH(0x2a725a8)', undef) called at /usr/local/share/per +l/5.18.2/Net/FTPServer/DirHandle.pm line 171 Net::FTPServer::DirHandle::_list_status('Net::FTPServer::InMem::Di +rHandle=HASH(0x2a725a8)', undef) called at /usr/local/share/perl/5.18 +.2/Net/FTPServer.pm line 5899 Net::FTPServer::_LIST_command('Net::FTPServer::Opencart=HASH(0x2a3 +8908)', 'LIST', '-la') called at /usr/local/share/perl/5.18.2/Net/FTP +Server.pm line 3004 Net::FTPServer::run('Net::FTPServer::Opencart') called at ./ftp-se +rver.pl line 220
The Net::FTPServer::InMem::FileHandle is listed in %INC. If I replace
my $fileh = new Net::FTPServer::InMem::FileHandle
with
my $fileh = Net::FTPServer::InMem::FileHandle->new
right in the Net::FTPServer::InMem::DirHandle at line 274, it starts to work. What's wrong ? How can I fix that ?

In reply to Constructor fails with Undefined subroutine when called as new Foo() by aguidrevitch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.