line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DesignPattern::Factory::ConcreteCreator; |
2
|
|
|
|
|
|
|
$VERSION = '0.01'; |
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
4
|
use Carp; # nice errors |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
5
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
6
|
1
|
|
|
1
|
|
456
|
use DesignPattern::Factory::Creator; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
7
|
|
|
|
|
|
|
@ISA = qw ( DesignPattern::Factory::Creator ); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub FactoryMethod |
10
|
|
|
|
|
|
|
{ |
11
|
1
|
|
|
1
|
|
389
|
use DesignPattern::Factory::ConcreteProduct; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
12
|
1
|
|
|
1
|
1
|
16
|
return DesignPattern::Factory::ConcreteProduct->new; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
DesignPattern::Factory::ConcreteCreator - a participant in the Perl implementation of the Factory Method. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
DesignPattern::Factory::ConcreteCreator overrides the factory method it inherits from DesignPattern::Factory::Creator to return an instance of a ConcreteProduct. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 FactoryMethod() |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Returns a new ConcreteProduct. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 AUTHOR |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Nigel Wetters (nwetters@cpan.org) |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 COPYRIGHT |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Copyright (c) 2001, Nigel Wetters. All Rights Reserved. This module is free software. |
35
|
|
|
|
|
|
|
It may be used, redistributed and/or modified under the same terms as Perl itself. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |