4 use vars qw($VERSION @Pref);
6 @Pref = qw(CGI::Apache CGI); #default
17 ($file = $pack) =~ s|::|/|g;
18 eval { require "$file.pm"; };
23 #XXX warn "Going to try $pack\->new\n";
25 eval {$obj = $pack->new(@_)};
33 Carp::croak "Couldn't load+construct any of @Pref\n";
41 CGI::Switch - Try more than one constructors and return the first object available
50 use CGI::Switch This, That, CGI::XA, Foo, Bar, CGI;
52 my $q = new CGI::Switch;
56 Per default the new() method tries to call new() in the three packages
57 Apache::CGI, CGI::XA, and CGI. It returns the first CGI object it
60 The import method allows you to set up the default order of the
65 perl(1), Apache(3), CGI(3), CGI::XA(3)
69 Andreas KE<ouml>nig E<lt>a.koenig@mind.deE<gt>