Created a txt file from NewPluginTemplate renaming it, placing it in each of the Webs on our server.
Initially I was getting illegal declaration of subroutine error
Plugin "TWiki::Plugins::FolderDisplayPlugin" could not be loaded by Perl. Errors were:
----
Illegal declaration of subroutine TWiki::Plugins::FolderDisplayPlugin::TableFolderListing at
../lib/TWiki/Plugins/FolderDisplayPlugin.pm line 116.
Compilation failed in require at (eval 21) line 1.
BEGIN failed--compilation aborted at (eval 21) line 1.
sub TableFolderListing line (weird as none of the other subs have a ; at the end of the line).Restarted apache and now get the following errors:
Plugin "TWiki::Plugins::FolderDisplayPlugin" could not be loaded by Perl. Errors were:
----
TWiki/Plugins/FolderDisplayPlugin.pm did not return a true value at (eval 21) line 1.
BEGIN failed--compilation aborted at (eval 21) line 1.
----
Plugin "TWiki::Plugins::FolderDisplayPlugin" could not be loaded by Perl. Errors were:
----
TWiki/Plugins/FolderDisplayPlugin.pm did not return a true value at (eval 32) line 1.
BEGIN failed--compilation aborted at (eval 32) line 1.
----
hmm
sub TableFolderListing
{
...
}
1;You can check that your perl module is compilable before running it in the TWiki context: perl -c TWiki::Plugins::YourPluginName.pm HTH. M. Martin, -- MartinCleaver - 06 Apr 2005 Thank you. The perl -c tip is excellent. The required 1; is interesting, I use Arachnophilia as my editor and it has a minor bug wherein it inserts a | at the end of the perl script causing it to crash, consequently I now automatically scan my scripts and remove the trailing | (or in this case the trailing 1). -- SteveMayes - 06 Apr 2005
| I | Attachment | History | Action | Size | Date | Who | Comment |
|---|---|---|---|---|---|---|---|
| |
FolderDisplayPlugin.pm | r1 | manage | 5.9 K | 2005-04-06 - 12:35 | UnknownUser | |
| |
FolderDisplayPlugin.txt | r1 | manage | 2.1 K | 2005-04-06 - 12:35 | UnknownUser |