| 1 | # | ||||||||||
| 2 | # Copyright 2005, Karl Y. Pradene <knotty@cpan.org> All rights reserved. | ||||||||||
| 3 | # | ||||||||||
| 4 | |||||||||||
| 5 | package Net::IRC2::Chan ; | ||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use strict; use warnings ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use Exporter ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | our @ISA = qw( Exporter ) ; | ||||||||||
| 11 | our @EXPORT_OK = qw( new ) ; | ||||||||||
| 12 | our @Export = qw( new ) ; | ||||||||||
| 13 | |||||||||||
| 14 | 1 | ▶ | use vars qw( $VERSION ) ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | $VERSION = '0.27' ; | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub new { shift and return bless { @_ } } | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | { my ( $code, $name ) = q{ sub { return $_[0]->{NAME} = $_[1] || $_[0]->{NAME} } } ; | ||||||||||
| 21 | 1 | ▶ | no strict 'refs' ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | foreach $name qw( name topic ) { | ||||||||||
| 23 | $_ = $code ; s/NAME/$name/g ; *{$name} = eval } } | ||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | no strict ; | ||||||||||
| 27 | map { *{$_} = eval 'sub { return $_[0]->{'.$_.'} = $_[1] || $_[0]->{'.$_.'} }' | ||||||||||
| 28 | } qw ( name topic ); | ||||||||||
| 29 | use strict; | ||||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | 1; | ||||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||