in reply to Use + versus Require

See use. use Some::Module LIST is essentially

BEGIN { require Some::Module; Some::Module->import( LIST ); }

So just adapt that to your needs. A likely literal translation gives me:

require SOAP::Lite; SOAP::Lite->import( +autodispatch => 'proxy' => http://soap.soapserver.com', # there +is a typo on this line, in the original post on_fault => \&handle_error; )

The "fat comma operator", => simply stringifies its left-hand operand. So this is equivalent to

require SOAP::Lite; SOAP::Lite->import( '+autodispatch' => 'proxy' => http://soap.soapserver.com', # there +is a typo on this line, in the original post 'on_fault' => \&handle_error;

Replies are listed 'Best First'.
Re^2: Use + versus Require
by Fletch (Bishop) on Dec 14, 2007 at 21:33 UTC

    No, the + is just the unary + operator applied to the bareword which is just the bareword itself; it doesn't make it part of the argument.

    $ perl -le 'BEGIN{package Foo; sub import { print join( "\n", @_ ) }; +$INC{"Foo.pm"}=1; } use Foo +bar => "baz", -quux => "jinkies";' Foo bar baz -quux jinkies

    I think SOAP::Lite uses the + as a visual cue to distinguish it from options which are prefixed by a - to indicate they're disabled (and the fat comma special cases - so that -foo => "blah" does give "-foo", "blah" even though "-" isn't a \w character).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.