still the same problem with this:
thanks#!/usr/bin/env perl use strict; use warnings; my $total_sleep_time = 0; BEGIN { my $actual_sleep = \&CORE::GLOBAL::sleep; *CORE::GLOBAL::sleep = sub { $total_sleep_time+=$_[0]; $actual_sleep-> +($_[0]) } } # use this module and the other # ... sleep(2); print "total sleep is $total_sleep_time\n";
In reply to Re^2: Copy a builtin sub to a different name and then override
by bliako
in thread Copy a builtin sub to a different name and then override
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |