~ubuntu-branches/ubuntu/wily/padre/wily

« back to all changes in this revision

Viewing changes to lib/Padre/DB/SyntaxHighlight.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-08-12 14:44:55 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090812144455-yvk90oa92khfcnls
Tags: 0.42-1
* New Upstream Version
  + add explicit dependency on libtest-simple-perl (>= 0.88)
  + rules: use dh --with quilt (and bump quilt build-dependency to 0.46-7)
  + rules: no need to re-generate .mo files from .po. Upstream does it now
  + copyright: describe share/icons/padre/16x16/logo.png
    - describe share/icons/padre/16x16/toggle-comments.png
    - Padre license is the same as Perl (i.e. not Perl 5)
    - update list of copright holders
    - also list translators
  + drop libtest-most-perl from build-dependencies
  + add liblocale-msgfmt-perl to build-dependencies
  + add libcapture-tiny-perl to (build-)dependencies
  + add libfile-remove-perl (>= 1.42) to (build-)dependencies
  + drop libmodule-inspector-perl from (build-)dependencies
  + add libppix-editortools-perl to (build-)dependencies
  + add libparse-exuberantctags-perl to (build-)dependencies
  + patches:
    - drop lower-wx-requirement-to-2.8.7.patch and replace it with
      SKIP_WXWIDGETS_VERSION_CHECK=1 when configuring
      adjust README.debian accordingly
    - refresh disable-tcp-server.patch
    - drop don't-require-new-file-path.patch (applied upstream)
    - rework fix-pod2-errors.patch (new release, new errors :))
* add fix-perl-interpreter-path.patch fixing the path to the perl interpreter
  in three examples (thanks lintian)
* add more lintian overrides about script-not-executable for scripts that are
  treated as examples/templates
* add fix-whatis.patch fixing the whatis entry of Padre::Wx
* add menu and .desktop file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package Padre::DB::SyntaxHighlight;
 
2
 
 
3
# This class will be automatically loaded by Padre::DB,
 
4
# Overloading the code already auto-generated by Padre::DB.
 
5
 
 
6
use strict;
 
7
use warnings;
 
8
 
 
9
our $VERSION = '0.42';
 
10
 
 
11
sub set_mime_type {
 
12
        my $class     = shift;
 
13
        my $mime_type = shift;
 
14
        my $module    = shift;
 
15
 
 
16
        Padre::DB->begin;
 
17
        $class->delete(
 
18
                'where mime_type = ?', $mime_type,
 
19
        );
 
20
        $class->create(
 
21
                mime_type => $mime_type,
 
22
                value     => $module,
 
23
        );
 
24
        Padre::DB->commit;
 
25
        return;
 
26
}
 
27
 
 
28
1;
 
29
 
 
30
__END__
 
31
 
 
32
=pod
 
33
 
 
34
=head1 NAME
 
35
 
 
36
Padre::DB::SyntaxHighlight - Database table to store mime-type to syntax highlighter mapping
 
37
 
 
38
=head1 SYNOPSIS
 
39
 
 
40
        my @files = Padre::DB::SyntaxHighlight->select(
 
41
                'where mime_type = ?', $mime_type,
 
42
        );
 
43
 
 
44
=head1 DESCRIPTION
 
45
 
 
46
This class allows storing in L<Padre>'s database the the name of the 
 
47
syntax highlighter module.
 
48
 
 
49
=head1 PUBLIC METHODS
 
50
 
 
51
=head2 Accessors
 
52
 
 
53
The following accessors are automatically created by L<ORLite>:
 
54
 
 
55
=over 4
 
56
 
 
57
=item id()
 
58
 
 
59
=item file()
 
60
 
 
61
=item position()
 
62
 
 
63
=item focus()
 
64
 
 
65
=item session()
 
66
 
 
67
=back
 
68
 
 
69
=head2 Class methods
 
70
 
 
71
The following subs are automatically created by L<ORLite>.
 
72
Refer to L<ORLite> for more information on them:
 
73
 
 
74
=over 4
 
75
 
 
76
=item select()
 
77
 
 
78
=item count()
 
79
 
 
80
=item new()
 
81
 
 
82
=item create()
 
83
 
 
84
=item insert()
 
85
 
 
86
=item delete()
 
87
 
 
88
=item truncate()
 
89
 
 
90
=back
 
91
 
 
92
=head1 COPYRIGHT & LICENSE
 
93
 
 
94
Copyright 2008-2009 The Padre development team as listed in Padre.pm.
 
95
 
 
96
This program is free software; you can redistribute
 
97
it and/or modify it under the same terms as Perl itself.
 
98
 
 
99
The full text of the license can be found in the
 
100
LICENSE file included with this module.
 
101
 
 
102
=cut
 
103
 
 
104
# Copyright 2008-2009 The Padre development team as listed in Padre.pm.
 
105
# LICENSE
 
106
# This program is free software; you can redistribute it and/or
 
107
# modify it under the same terms as Perl 5 itself.