~ubuntu-branches/ubuntu/trusty/bioperl/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/Deobfuscator/lib/Deobfuscator.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
=head1 VERSION
23
23
 
24
 
This document describes Deobfuscator version 0.0.2
 
24
This document describes Deobfuscator version 0.0.3
25
25
 
26
26
 
27
27
=head1 SYNOPSIS
136
136
Bioperl modules. Send your comments and suggestions preferably to one
137
137
of the Bioperl mailing lists.  Your participation is much appreciated.
138
138
 
139
 
  bioperl-l@bioperl.org                  - General discussion
 
139
  bioperl-l@bioperl.org                       - General discussion
140
140
  http://www.bioperl.org/wiki/Mailing_lists   - About the mailing lists
141
141
 
142
142
=head2 Reporting Bugs
145
145
the bugs and their resolution.  Bug reports can be submitted via the
146
146
web:
147
147
 
148
 
  http://bugzilla.open-bio.org/
 
148
  http://bugzilla.bioperl.org/
149
149
 
150
150
 
151
151
=head1 SEE ALSO
197
197
=cut
198
198
 
199
199
 
200
 
use version; $VERSION = qv('0.0.2');
 
200
use version; $VERSION = qv('0.0.3');
201
201
use warnings;
202
202
use strict;
203
203
use Class::Inspector;
322
322
sub _load_module {
323
323
    my $module = shift;
324
324
    eval "require $module";
325
 
    die "error! couldn't eval $module" if $@;
 
325
    my $err = $@ || 'eval returned undef';
 
326
    
 
327
    if ($@) { return $@ }
 
328
    else { return }
326
329
}
327
330
 
328
331
=head2 open_db
481
484
        # change isolated colons into <br> tags
482
485
        $string =~ s/\s:\s/ <br> /g;
483
486
 
 
487
    # change L<> POD link into HTML link
 
488
    if ( $string =~ /L<(.+)>/ ) {
 
489
        $string = urlify_pkg($1);
 
490
    }
 
491
 
484
492
        return $string;
485
493
}
486
494
 
 
495
=head2 urlify_pkg
 
496
 
 
497
Title   : urlify_pkg
 
498
Usage   : urlify_pkg($string);
 
499
Example : urlify('this is a : doc);
 
500
Function: wraps a package name in an HTML href pointing to the bioperl.org
 
501
          pdoc docs for that package
 
502
Returns : a string (an href in HTML)
 
503
Args    : a string
 
504
 
 
505
=cut
 
506
 
 
507
sub urlify_pkg {
 
508
    my ($pkg_name) = @_;
 
509
    my $bioperl_doc_url = q{http://doc.bioperl.org/bioperl-live/};
 
510
 
 
511
    my $pkg_as_path = $pkg_name;
 
512
 
 
513
    # convert Bio::DB::RefSeq to Bio/DB/RefSeq
 
514
    $pkg_as_path =~ s/::/\//g;
 
515
    my $url  = $bioperl_doc_url . $pkg_as_path . '.html';
 
516
    my $href = qq{<a href="$url">$pkg_name</a>};
 
517
 
 
518
    return $href;
 
519
}
 
520
 
 
521
 
487
522
1;
488
523
__END__