in reply to Use + versus Require
The outputpackage MyTest; use Data::Dumper; sub import { warn Dumper \@_; } package main; BEGIN { # code to keep use and require for complaining # that there is no MyTest.pm file $INC{'MyTest.pm'} = 'testfile'; } sub handle_error{ die; } use MyTest +autodispatch => proxy => 'use'; BEGIN { require MyTest; MyTest->import( +autodispatch => proxy => 'require', ); } MyTest->import( '+autodispatch' => proxy => 'require as string', );
The only really interesting thing I see is that$VAR1 = [ 'MyTest', 'autodispatch', 'proxy', 'use' ]; $VAR1 = [ 'MyTest', 'autodispatch', 'proxy', 'require' ]; $VAR1 = [ 'MyTest', '+autodispatch', 'proxy', 'require as string' ];
+autodispatch =>
and
'+autodispatch' =>are not the same.
|
|---|