Opened 3 years ago

Closed 3 years ago

#1278 closed defect (fixed)

Padre::Plugin::LaTeX, fix for missing version & some :)

Reported by: bowtie Owned by: zenog
Priority: major Milestone:
Component: plugins Version: 0.87
Keywords: Cc:

Description

As requested, relating to this afternoons irc, ;)

  • lib/Padre/Plugin/LaTeX.pm

     
    44 
    55use warnings; 
    66use strict; 
    7  
     7our $VERSION = '0.110'; 
    88use File::Spec::Functions qw{ catfile }; 
    99 
    1010use base 'Padre::Plugin'; 
     
    1515} 
    1616 
    1717sub padre_interfaces { 
    18     'Padre::Plugin' => 0.81, 'Padre::Document' => 0.81; 
     18    return ( 
     19    'Padre::Plugin' => '0.86', 
     20    'Padre::Document' => '0.86', 
     21    'Padre::Wx::Main' => '0.86', 
     22    ); 
    1923} 
    2024 
    2125sub registered_documents { 
     
    194198    return; 
    195199} 
    196200 
     201####### 
     202# Clean up, Padre::Plugin, 
     203# POD out of date as of v0.84 
     204####### 
     205sub plugin_disable { 
     206    my $self = shift; 
    197207 
     208    # Close the dialog if it is hanging around 
     209    if ( $self->{dialog} ) { 
     210        $self->{dialog}->Destroy; 
     211        $self->{dialog} = undef; 
     212    } 
     213 
     214    # Unload all our child classes 
     215    $self->unload('Padre::Document::LaTeX'); 
     216    $self->unload('Padre::Document::BibTeX'); 
     217 
     218    return 1; 
     219} 
     220 
    1982211; 
    199222__END__ 
    200223 

Attachments (1)

LaTeX.pm.patch (1.0 KB) - added by bowtie 3 years ago.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by bowtie

comment:1 Changed 3 years ago by bowtie

  • Some Plugin will require a plugin_enable method,
    • Why because it's using an external resource, which is not being picked up via perl (M::I).
    • You can see this method has only been enabled for Ubuntu, it needs more os file locations adding.
#########
# We need plugin_enable
# as we have an external dependancy
#########
sub plugin_enable {

    my $pdflatex_exists = 0;
    
    # ToDo add other os locations
    # Ubuntu -> /usr/bin/
    my @directories = qw( /usr/bin/ );
    find(
        sub {
            if ( $_ eq 'pdflatex' ) {
                $pdflatex_exists = 1;
            }
        },
        @directories
    );

    return $pdflatex_exists;
}

From Padre::Plugin::LaTeX

comment:2 Changed 3 years ago by bowtie

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.