~ubuntu-branches/ubuntu/lucid/padre/lucid

« back to all changes in this revision

Viewing changes to lib/Padre/DocBrowser.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:
7
7
use Scalar::Util           ();
8
8
use Padre::DocBrowser::POD ();
9
9
 
10
 
our $VERSION = '0.36';
 
10
our $VERSION = '0.42';
11
11
 
12
12
use Class::XSAccessor getters => {
13
13
        get_providers => 'providers',
235
235
sub accept {
236
236
        my ( $self, $scheme ) = @_;
237
237
        if ( defined $self->get_schemes->{$scheme} ) {
238
 
                return 1;
 
238
                return $self->get_schemes->{$scheme};
239
239
        }
240
240
        return;
241
241
}
259
259
                my $docs = $provider->generate($doc);
260
260
                return $docs;
261
261
        }
262
 
 
263
 
        #warn "No provider for " . $doc->mimetype;
264
262
        return;
265
263
}
266
264
 
268
266
        my ( $self, $ref, $hints ) = @_;
269
267
        my @refs;
270
268
        if ( Scalar::Util::blessed($ref) and $ref->isa('URI') ) {
271
 
                return $self->resolve_uri($ref);
 
269
                return $self->resolve_uri( $ref, $hints );
272
270
        }
273
271
 
274
272
        # TODO this doubles up if a provider subscribes to multi
282
280
}
283
281
 
284
282
sub resolve_uri {
285
 
        my ( $self, $uri ) = @_;
286
 
        my $resolver = $self->get_schemes->{ $uri->scheme };
287
 
        my $doc      = $resolver->resolve( $uri->opaque );
 
283
        my ( $self, $uri, $hints ) = @_;
 
284
        my $resolver = $self->accept( $uri->scheme );
 
285
        return unless $resolver;
 
286
        my $doc = $resolver->resolve( $uri, $hints );
288
287
        return $doc;
289
288
}
290
289