File: simple.pl

package info (click to toggle)
libshell-config-generate-perl 0.34-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 268 kB
  • sloc: perl: 595; sh: 3; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (2)
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

use strict;
use warnings;
use Shell::Guess;
use Shell::Config::Generate;

my $config = Shell::Config::Generate->new;
$config->comment( 'this is my config file' );
$config->set( FOO => 'bar' );
$config->set_path(
  PERL5LIB => '/foo/bar/lib/perl5',
              '/foo/bar/lib/perl5/perl5/site',
);
$config->append_path(
  PATH => '/foo/bar/bin',
          '/bar/foo/bin',
);

$config->generate_file(Shell::Guess->bourne_shell, 'config.sh');
$config->generate_file(Shell::Guess->c_shell, 'config.csh');
$config->generate_file(Shell::Guess->cmd_shell, 'config.cmd');