Permalink
Browse files

Bugfix: wasn't checking return value from _load_module, so when it fa…

…iled we never knew. Documentation added for new error message and for requirement that BioPerl itself be in @INC. Bug reporting and email address also updated.
  • Loading branch information...
DaveMessina committed Oct 20, 2013
1 parent 6f76751 commit 129bf4309baef7e2df07273e0cea0a6c96de8b43
Showing with 52 additions and 28 deletions.
  1. +37 −13 doc/Deobfuscator/README
  2. +15 −15 doc/Deobfuscator/lib/Deobfuscator.pm
View
@@ -15,7 +15,8 @@ each module through a searchable web interface.
DOCUMENTATION
-All of the code in this distribution have POD documentation, which can be read using the perldoc command. For example,
+All of the code in this distribution have POD documentation, which can
+be read using the perldoc command. For example,
perldoc lib/Deobfuscator.pm
@@ -35,7 +36,8 @@ placed in a directory accessible to a webserver.
Follow these steps to install the Deobfuscator on your system:
-1) Follow the standard CPAN installation procedure to install the Deobfuscator.pm module and the deob_index.pl program.
+1) Follow the standard CPAN installation procedure to install the
+Deobfuscator.pm module and the deob_index.pl program.
Run the following commands:
@@ -63,12 +65,15 @@ UNIX system, the command
should do it.
-4) Run deob_index.pl. For a default installation, run it from your webserver's cgi-bin directory. On UNIX systems, it should be something like:
+4) Run deob_index.pl. For a default installation, run it from your
+webserver's cgi-bin directory. On UNIX systems, it should be something
+like:
cd /Library/WebServer/CGI-Executables
deob_index.pl /Library/Perl/5.8.6/Bio .
-When the command finishes, it should show you some stats on the indexing. On my system it looked like this for BioPerl 1.5.1:
+When the command finishes, it should show you some stats on the
+indexing. On my system it looked like this for BioPerl 1.5.1:
This indexing run found:
803 files
@@ -77,26 +82,45 @@ This indexing run found:
788 synopsis
5660 methods
-If the number of files is much lower than this (like 0), then deob_index.pl may have been pointed to the wrong directory.
+If the number of files is much lower than this (like 0), then
+deob_index.pl may have been pointed to the wrong directory.
There should also be some new files in the directory you ran it from:
packages.db
methods.db
package_list.txt
deob_index.log
-You can move or delete deob_index.log and the Deobfuscator should still work,
-but the other three files need to be in the same directory as deob_interface.cgi and deob_index.cgi unless you change the hardcoded variables in those scripts. See their documentation if you want to do that.
+You can move or delete deob_index.log and the Deobfuscator should
+still work, but the other three files need to be in the same directory
+as deob_interface.cgi and deob_index.cgi unless you change the
+hardcoded variables in those scripts. See their documentation if you
+want to do that.
-5) Test your installation by pointing your browser to the deob_interface.cgi script. On my system, the URL is:
+5) Test your installation by pointing your browser to the
+deob_interface.cgi script. On my system, the URL is:
http://localhost/cgi-bin/deob_interface.cgi
-If you get an error, check the permissions on the cgi-scripts and the files that deob_index.pl created in the last step. Your webserver error log may also be helpful.
-
-If you moved any of the files outside of your webserver's cgi-bin directory, make sure that the hardcoded variables in deob_interface.cgi point to their new location.
-
-6) That should be it! As always, check the POD documentation in the individual files for more information. And if you have comments, suggesions, or problems, send an email to the BioPerl mailing list <bioperl-l@bioperl.org>.
+If you get an error, check the permissions on the cgi-scripts and the
+files that deob_index.pl created in the last step. Your webserver
+error log may also be helpful.
+
+If you moved any of the files outside of your webserver's cgi-bin
+directory, make sure that the hardcoded variables in
+deob_interface.cgi point to their new location.
+
+The BioPerl code itself (the modules) need to be in the @INC
+(PERL5LIB) of the user running the Deobfuscator
+itself. (Class::Inspector, used under the hood by the Deobfuscator,
+must be able to 'use' a module in order to find its methods.) You may
+need to add a 'use lib' directive at the beginning of
+deob_interface.cgi.
+
+6) That should be it! As always, check the POD documentation in the
+individual files for more information. And if you have comments,
+suggesions, or problems, send an email to the BioPerl mailing list
+<bioperl-l@bioperl.org>.
DEPENDENCIES
View
@@ -10,7 +10,7 @@ package Deobfuscator;
# part of the Deobfuscator package
# by Laura Kavanaugh and Dave Messina
#
-# cared for by Dave Messina <dave-pause@davemessina.net>
+# cared for by Dave Messina <dave-pause@davemessina.com>
#
# POD documentation - main docs before the code
@@ -87,6 +87,15 @@ transient filesystem error.
=back
+=item C<< error: couldn't load [module] >>
+
+The BioPerl modules aren't in the Perl lib (PERL5LIB) and so can't be searched
+(the Deobfuscator uses I<Class::Inspector> for this. Check that the value of
+your PERL5LIB includes BioPerl's modules. If need be, you can set a use lub directive
+at the beginning of deob_interface.cgi.
+
+=back
+
=head1 CONFIGURATION AND ENVIRONMENT
@@ -139,24 +148,13 @@ of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
-=head2 Support
-
-Please direct usage questions or support issues to the mailing list:
-
-L<bioperl-l@bioperl.org>
-
-rather than to the module maintainer directly. Many experienced and
-reponsive experts will be able look at the problem and quickly
-address it. Please include a thorough description of the problem
-with code and data examples if at all possible.
-
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via the
web:
- https://redmine.open-bio.org/projects/bioperl/
+ http://bugzilla.bioperl.org/
=head1 SEE ALSO
@@ -248,7 +246,8 @@ sub return_methods {
foreach my $class (@input) {
# fancy eval so that we can loop through different modules
- _load_module($class);
+ my $retval = _load_module($class);
+ if ($retval) { die "error: couldn't load $class: $retval\n"; }
# methods returned from Class::Inspector as:
# [
@@ -293,7 +292,8 @@ sub print_methods {
foreach my $class (@input) {
# fancy eval so that we can loop through different modules
- _load_module($class);
+ my $retval = _load_module($class);
+ if ($retval) { die "error: couldn't load $class: $retval\n"; }
# methods returned as
# [

0 comments on commit 129bf43

Please sign in to comment.