~ubuntu-branches/ubuntu/karmic/padre/karmic

« back to all changes in this revision

Viewing changes to script/padre

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-05-09 18:19:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090509181953-ttew3adppp057nha
Tags: 0.35-1
* New Upstream Version

* install eg/ as examples only in padre (not also in libwx-perl-
  dialog-perl)
* mention --pristine-tar in README.source
* add disable-tcp-server.patch
  the tcp server is used for communication with running instance of padre.
  Although it only listens on 127.0.0.1, there is no measures taken to
  ensure that the user connecting to the server is the same as the user
  running padre.
* add README.debian documenting changes in the package compared to
  upstream sources

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl 
2
2
 
 
3
use 5.008005;
3
4
use strict;
4
5
use warnings;
 
6
use File::Which  ();
5
7
use Getopt::Long ();
6
8
 
7
9
$| = 1;
8
10
 
9
 
#must run using wxPerl on OSX.
10
 
if (($^O eq 'darwin') and ($^X !~ m{/wxPerl\.app/})) {
11
 
    my $perl_path = `which wxPerl`;
12
 
    chomp($perl_path);
13
 
    if (-e $perl_path) {
 
11
# Must run using wxPerl on OSX.
 
12
if ( $^O eq 'darwin' and $^X !~ m{/wxPerl\.app/} ) {
 
13
    my $perl = scalar File::Which::which('wxPerl');
 
14
    chomp($perl);
 
15
    if ( -e $perl ) {
14
16
        warn "spawning 'wxPerl' interpreter for OSX\n";
15
 
        system($perl_path, '-S', $0, @ARGV);
 
17
        system( $perl, '-S', $0, @ARGV );
16
18
    } else {
17
19
        warn "padre cannot find wxPerl executable (which it requires on OSX)\n" ;
18
20
    }
24
26
my $USAGE   = '';
25
27
my $HOME    = undef;
26
28
my $session = undef;
27
 
my $getopt = Getopt::Long::GetOptions(
 
29
my $getopt  = Getopt::Long::GetOptions(
28
30
        'help'      => \$USAGE,
29
31
        'home=s'    => \$HOME,
30
32
        'session=s' => \$session,
53
55
    files   => \@ARGV,
54
56
    session => $session,
55
57
);
56
 
    
 
58
 
57
59
require Padre;
58
60
my $app = Padre->new(%opts);
 
61
unless ( $app ) {
 
62
    # Single instance worked correctly
 
63
    exit(0);
 
64
}
 
65
 
 
66
# Start the application
59
67
$app->run;
60
68
 
61
69
# Copyright 2008-2009 The Padre development team as listed in Padre.pm.