Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 1.554 kb
Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3409/cover_db
--------------------------------------------------------------- ------ ------
File pod total
--------------------------------------------------------------- ------ ------
tests/alias n/a n/a
Total n/a n/a
--------------------------------------------------------------- ------ ------
tests/alias
line err pod code
1 #!/usr/bin/perl
2
3 # Copyright 2004, Paul Johnson (pjcj@cpan.org)
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # http://www.pjcj.net
9
10 package Foo;
11
12 sub is_3digits {
13 my $val = shift;
14 my $retval = undef;
15 $retval=1 if $val =~ /^\d{3}$/;
16 return $retval;
17 }
18
19 package main;
20
21 *main::is_3digits = *Foo::is_3digits;
22 # delete $Foo::{is_3digits};
23
24 is_3digits(1234);
25 is_3digits(123);
Jump to Line
Something went wrong with that request. Please try again.