Changes between Version 5 and Version 6 of PadrePluginCookbookRecipie05
- Timestamp:
- 08/05/11 19:34:56 (23 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PadrePluginCookbookRecipie05
v5 v6 13 13 14 14 The following is as a result of analysing Plugins for this page. 15 16 The examples here, where relevant will build upon Cookbook, some relate to other Plug-ins as it is more pertinent to use them, 15 17 ---- 16 18 == Outline … … 23 25 our $VERSION = '0.01'; 24 26 }}} 25 26 27 * Plugin must it's **Interfaces**, all Padre Modules should be included 27 28 * Don't forget to include the following sub. … … 45 46 } 46 47 }}} 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 ######### 58 sub 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 }}} 77 From {{{Padre::Plugin::LaTeX}}} 47 78 * draft needs tiding up 48 79 {{{#!text
