Thread Ambiguous call resolved as CORE::close() (5 answers)
Opened by RalphFFM at 2007-04-11 17:16

renee
 2007-04-11 17:29
#75953 #75953
User since
2003-08-04
14371 articles
ModeratorIn
[Homepage] [default_avatar]
Aus perldiag

Quote
Ambiguous call resolved as CORE::%s(), qualify as such or use &

(W ambiguous) A subroutine you have declared has the same name as a Perl keyword, and you have used the name without qualification for calling one or the other. Perl decided to call the builtin because the subroutine is not imported.

To force interpretation as a subroutine call, either put an ampersand before the subroutine name, or qualify the name with its package. Alternatively, you can import the subroutine (or pretend that it's imported with the use subs pragma).

To silently interpret it as the Perl operator, use the CORE:: prefix on the operator (e.g. CORE::log($x) ) or declare the subroutine to be an object method (see "Subroutine Attributes" in perlsub or attributes).


Du musst also das Package angeben... Entweder CORE::open oder eben DeinPackage::open...
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Ambiguous call resolved as CORE::close()