develooper Front page | perl.perl5.porters | Postings from April 2000

Re: [ID 20000403.009] uninitialised concatenation???

From:
Tom Christiansen
Date:
April 4, 2000 07:06
Subject:
Re: [ID 20000403.009] uninitialised concatenation???
Message ID:
21134.954857181@chthon
PERL IS BROKEN AGAIN!

    use warnings;
    use Carp;
    $SIG{__WARN__} = \&Carp::cluck;

    sub Funny::guy {
	my $whoami = (caller(0))[3];
	print("$whoami: where is my $x?\n");
    } 

    *snagglepuss = \&Funny::guy;

    snagglepuss();

    no warnings 'redefine';
    *snagglepuss = sub {
	my $whoami = (caller(0))[3];
	print("$whoami: where is my $x?\n");
    }; 

    snagglepuss();

Look at this:

    Use of uninitialized value in concatenation (.) at /tmp/a line 7.
	    Funny::guy() called at /tmp/a line 12
    Use of uninitialized value in concatenation (.) at /tmp/a line 17.
	    main::__ANON__() called at /tmp/a line 20
    Funny::guy: where is my ?
    main::__ANON__: where is my ?

Where is snagglepuss?   I called it twice!  Perl is lying to
me.  Snivelling suckatush.

--tom



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About