Changeset 10032


Ignore:
Timestamp:
01/01/10 03:00:11 (2 years ago)
Author:
Sewi
Message:

Add new dev.pl option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/dev.pl

    r9823 r10032  
    1414# Collect options early 
    1515use Getopt::Long (); 
    16 use vars qw{$DEBUG $TRACE $DIE $PROFILE $PLUGINS $USAGE}; 
     16use vars qw{$DEBUG $TRACE $DIE $PROFILE $PLUGINS $USAGE $FULLTRACE}; 
    1717 
    1818BEGIN { 
     
    2222    $PLUGINS = 0; 
    2323    $USAGE   = 0; 
     24    $FULLTRACE = 0; 
    2425    Getopt::Long::GetOptions( 
    2526        'usage|help' => \$USAGE, 
     
    3132        'profile' => \$PROFILE, 
    3233        'a'       => \$PLUGINS, 
     34        'fulltrace' => \$FULLTRACE, 
    3335    ); 
    3436} 
     
    7072push @cmd, '-d'          if $DEBUG; 
    7173push @cmd, '-dt:NYTProf' if $PROFILE; 
     74 
     75if ($FULLTRACE) { 
     76    eval { require Devel::Trace; }; 
     77    if ($@) { 
     78    print "Error while initilizing --fulltrace while trying to load Devel::Trace:\n". 
     79          "$@Maybe Devel::Trace isn't installed?\n"; 
     80    exit 1; 
     81    } 
     82    push @cmd, '-d:Trace'; 
     83} 
    7284 
    7385# Rebuild translations 
     
    114126    print <<"END_USAGE"; 
    115127Usage: $0 
    116         -h     show this help 
    117         -d     run Padre in the command line debugger (-d) 
    118     -t     write tracing information to .padre/debug.log 
    119         -p     profile using Devel::NYTProf 
    120         -a     load all plugins in the svn checkout 
    121         --die  add DIE handler 
     128        -h          show this help 
     129        -d          run Padre in the command line debugger (-d) 
     130    -t          write tracing information to .padre/debug.log 
     131        -p          profile using Devel::NYTProf 
     132        -a          load all plugins in the svn checkout 
     133        --die       add DIE handler 
     134        --fulltrace full sourcecode trace to STDERR 
    122135 
    123136       LIST OF FILES    list of files to open 
Note: See TracChangeset for help on using the changeset viewer.