Moritz's fine suggestion is the correct starting point for diagnosis, but I just wanted to suggest that this sounds like a file security problem.
When you modify and save a file, it likely changes the security attributes - owner, and permissions.
"Restoring" the file presumably keeps these attributes intact.
Suggestion: check these attributes ("ls -l" in linux, combination of "dir" and "cacls" or exploder GUI in windows) before and after your modifications.
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
| [reply] |
There is Perl, which is the language, and perl, which is the interpreter/compiler. PERL doesn't exist (except as Inline::PERL).
but whenever I change the module it falls over with an internal server error.
That is the correct time to look into the error log file of the web server, to find out why it responds with an internal error.
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] |
Whenever I am troubleshooting a web problem, I keep a separate terminal window open and 'tail -f error.log' for the apache error log. It usually makes quick work of tracking down where a problem lies, especially since most browsers aren't giving useful error messages directly to the browser.
Also, it's a great help if you post some code (using the <code> tag) so we can better assist in finding the problem. If the code isn't too long, I'd recommend posting the entire thing, so someone can just copy/paste the entire script into their own system and try to run it (obviously having uncommon dependencies may hinder this) but it's good to get an overall idea of what you're trying to do, and what is actually happening.
| [reply] |
| [reply] |
Are you by any chance using a Windows text editor on a file from a *nix system? Unexpected Windows-style line separators (particularly on the #! line of a CGI script) could be one potential cause. | [reply] |
If all else fails, have you tried calling the module from a script on the command-line? You don't need to do much from that script, since it sounds like it is failing to compile (if changing a comment has the effect you say). Just do a use or even just load it using the -M command-line option. | [reply] |