Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Archive:EclipseEpicPerlDebug
(section)
Archive
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Set up Apache for interactive debugging == In your apache configuration, you need to include * The include paths of your perl module * The include path of the Eclipse debug code (which we will create in a section below, for the time being just trust me on the file paths) * The auto-reload of changed files for our module (which saves us from having to restart apache all the time) (Reload configuration courtesy of Tim Brody) * The perl options for debugging You will need to include something like the following in your apache configuration (I have this in my /etc/apache2/httpd.conf file): <pre> PerlSwitches -I/path/to/your/perl/module -I/path/to/your/perl/module/debug -I/path/to/development/eprints PerlModule Apache2::Reload PerlInitHandler Apache2::Reload PerlSetVar ReloadAll Off PerlSetVar ReloadModules "EPrints::* MyModule::*" <IfDefine PERLDB> PerlSetEnv PERLDB_OPTS "RemotePort=127.0.1.1:5000 DumpReused ReadLine=0 PrintRet=0" PerlSetEnv PERL5DB "BEGIN { $DB::CreateTTY=0; require '/path/to/your/perl/module/debug/perl5db.pl'; }" <Perl> use Apache::DB (); Apache::DB->init; </Perl> <Location /> PerlFixupHandler Apache::DB </Location> </IfDefine> </pre> The PerlSwitches line includes three module locations into the @INC configuration for the mod_perl environment. The first of these is the root of the directory where the perl modules that you are developing are located. The second of these is the location of the debug tools that EPIC will use to interrogate the Apache interactive debugger. I have placed these in the development environment here, so that we can manage them alongside our other code. We will come on to how to generate the content of this directory in the next point; for the time being just ensure that there is a place for it to go, and that the include points to it The third is the location of the EPrints source code in your development environment, which ensures that EPrints can run even if the source has been removed from /usr/share/eprints3/perl_lib. Of these three options, you can omit the first or third depending on your development setup, and the path to the debug module is entirely up to you. In the conditional <IfDefine> we set the configuration to ensure that the interactive debugger can send information out to the EPIC debug environment, and that at can find the perl5db.pl script. Note that the perl5db.pl script is part of the EPIC debugger configuration, and will be created in the next step. The rest of the configuration ensures that mod_perl is using Apache::DB. This will only happen when we pass -D PERLDB as an argument when we start apache.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)