Overriding CORE::GLOBAL::print

2007-10-27 Thread Matisse Enzer
OK, i give up: What am i doing wrong: # # test.pl use strict; use warnings; use Test::More tests => 2; my $test_string = 'overrode function'; { no warnings qw(once); *CORE::GLOBAL::glob = sub { $test_string; }; *CORE::GLOBAL

Re: Overriding CORE::GLOBAL::print

2007-10-27 Thread chromatic
On Saturday 27 October 2007 11:39:26 Matisse Enzer wrote: > What am i doing wrong: > > > # > # test.pl > use strict; > use warnings; > use Test::More tests => 2; > > my $test_string = 'overrode function'; > > { > no warnings qw(once); > *CORE::

Re: Overriding CORE::GLOBAL::print

2007-10-27 Thread Matisse Enzer
On Oct 27, 2007, at 11:47 AM, chromatic wrote: I don't think you can override print. my $p = prototype 'CORE::print'; print defined $p ? $p : 'unoverrideable'; Ahh. nuts. And thank you - I did not know about 'prototype' We have an application that has 'print' strewn about a