Subject: | IO::File accepts no arguments for new(), checks for @_ == 1 or croaks |
Docs:
$fh = new IO::File "> file";
Code:
DB<<7>> v 310
307 ## Constructors, destructors.
308 ##
309
310 sub new {
311: my $class = ref($_[0]) || $_[0] || "IO::Handle";
312==> @_ == 1 or croak "usage: new $class";
313: my $io = gensym;
314: bless $io, $class;
315 }
316
DB<<10>> x IO::File->VERSION
0 1.14
DB<<11>> x IO->VERSION
0 1.25