Wed Oct 20 09:18:05 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
[MPC.git] / modules / Depgen / DependencyWriterFactory.pm
blob558793ea0a53c4ed87368e75252991c589b4d76f
1 package DependencyWriterFactory;
3 # ************************************************************
4 # Description : Create DependencyWriter objects.
5 # Author : Chad Elliott
6 # Create Date : 5/23/2003
7 # ************************************************************
9 # ************************************************************
10 # Pragmas
11 # ************************************************************
13 use strict;
15 use DependencyWriter;
17 # ************************************************************
18 # Data Section
19 # ************************************************************
21 my $writers = {};
23 # ************************************************************
24 # Subroutine Section
25 # ************************************************************
27 sub register {
28 $writers = shift;
32 sub create {
33 return $$writers{$_[0]}->new() if (defined $$writers{$_[0]});
35 print STDERR "WARNING: Invalid dependency writer type: $_[0]\n";
36 return new DependencyWriter();