Changes between Version 43 and Version 44 of PadrePluginCookbookRecipie05


Ignore:
Timestamp:
09/25/11 14:07:30 (3 years ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginCookbookRecipie05

    v43 v44  
    223223* Some Plug-ins will require a plugin_enable method, 
    224224 * Why because it's using an external resource, which is not being picked up via perl (M::I). 
    225  * You can see this only has Ubuntu locations, at precsent it needs more OS file locations adding. 
     225 * The use of File::Which::which is OS independent, and already in Padre stack. Alias++ 
    226226 
    227227{{{#!perl 
     
    233233 
    234234        my $pdflatex_exists = 0; 
    235  
    236         # ToDo add other os locations 
    237         # Ubuntu -> /usr/bin/ 
    238         my @directories = qw( /usr/bin/ ); 
    239         find( 
    240                 sub { 
    241                         if ( $_ eq 'pdflatex' ) { 
    242                                 $pdflatex_exists = 1; 
    243                         } 
    244                 }, 
    245                 @directories 
    246         ); 
     235         
     236        # Tests for external file in Path 
     237        if ( File::Which::which('pdflatex') ) { 
     238                $pdflatex_exists = 1; 
     239        } 
    247240 
    248241        return $pdflatex_exists;