Changes between Version 5 and Version 6 of PadrePluginCookbookRecipie05


Ignore:
Timestamp:
08/05/11 19:34:56 (3 years ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginCookbookRecipie05

    v5 v6  
    1313 
    1414The following is as a result of analysing Plugins for this page. 
     15 
     16The examples here, where relevant will build upon Cookbook, some relate to other Plug-ins as it is more pertinent to use them, 
    1517---- 
    1618== Outline 
     
    2325our $VERSION = '0.01'; 
    2426}}} 
    25  
    2627* Plugin must it's **Interfaces**, all Padre Modules should be included 
    2728 * Don't forget to include the following sub. 
     
    4546} 
    4647}}} 
     48 
     49* Some Plugin will require a plugin_enable method, 
     50 * Why because it's using an external resource, which is not being picked up via perl (M::I). 
     51 * You can see this method has only been enabled for Ubuntu, it needs more os file locations adding. 
     52 
     53{{{#!perl 
     54######### 
     55# We need plugin_enable 
     56# as we have an external dependancy 
     57######### 
     58sub plugin_enable { 
     59 
     60        my $pdflatex_exists = 0; 
     61         
     62        # ToDo add other os locations 
     63        # Ubuntu -> /usr/bin/ 
     64        my @directories = qw( /usr/bin/ ); 
     65        find( 
     66                sub { 
     67                        if ( $_ eq 'pdflatex' ) { 
     68                                $pdflatex_exists = 1; 
     69                        } 
     70                }, 
     71                @directories 
     72        ); 
     73 
     74        return $pdflatex_exists; 
     75} 
     76}}} 
     77From {{{Padre::Plugin::LaTeX}}} 
    4778* draft needs tiding up 
    4879{{{#!text