File: example2.pl

package info (click to toggle)
libcgi-xmlapplication-perl 1.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 196 kB
  • sloc: perl: 522; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

# (c) 2001 ph15h

# example2.pl

use lib qw( ../../  );

{
  # this script will figure by its calling name, which module to load
  my ( $package ) = ( $0 =~ /\/?(\w+)\.pl/i );
  require "$package.pm";

  # some times there are already information available at this level.
  my %ctxt = (-test=>1);

  my $script_class = new $package;
  $script_class->setStylesheetPath( "your/path" );
  $script_class->run(\%ctxt);
}