Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b17716f8da33a3d666e1b14fe7b067ea > files > 12

perl-CGI-XMLApplication-1.1.3-6mdv2010.0.noarch.rpm

#!/usr/bin/perl

# (c) 2001 ph15h

# example3.pl
#
# show how to pass script configurations
#
use lib qw( ../../  );

{
  # well i leave it up to your phantasy what to do here :)
  my %config = ( -DUMMY=>"the dummy" );

  my ( $package ) = ( $0 =~ /\/?(\w+)\.pl/i );
  require "$package.pm";
  my $script_class = new $package;

  # we could do some tricks with CGI.pm functions before run ...

  # and pass our prepared information to run().
  $script_class->run( \%config );
}