A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://perldoc.perl.org/overloading below:

overloading - perl pragma to lexically control overloading

CONTENTS #NAME

overloading - perl pragma to lexically control overloading

#SYNOPSIS
    {
	no overloading;
	my $str = "$object"; # doesn't call stringification overload
    }

    # it's lexical, so this stringifies:
    warn "$object";

    # it can be enabled per op
    no overloading qw("");
    warn "$object";

    # and also reenabled
    use overloading;
#DESCRIPTION

This pragma allows you to lexically disable or enable overloading.

#no overloading

Disables overloading entirely in the current lexical scope.

#no overloading @ops

Disables only specific overloads in the current lexical scope.

#use overloading

Reenables overloading in the current lexical scope.

#use overloading @ops

Reenables overloading only for specific ops in the current lexical scope.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4