Tags:
create new tag
view all tags
Perhaps the CgiScripts should be renamed to have .PL extensions. This properly designates the type of the file.

I suspect that the only reason they were named without was to hide the implementation detail of TWiki being written in Perl, but this solution causes a problem:

  1. Without a suffix Editors such as EclipseIDE cannot determine the type of the file (http://sourceforge.net/tracker/?func=detail&aid=731089&group_id=75859&atid=545275)

See also: SuffixForCgiScripts

-- MartinCleaver - 24 Jun 2003

> the only reason they were named without was to hide the implementation detail of TWiki being written in Perl
Erm. I think this is a major reason. In my projects I encountered several .sh files which are actually Perl scripts or binaries. Why? Because it was too much effort to change. Not to mention the many, many cases, where people did go through the hassle to change it.
The name is part of the interface! Leave out the implementation aka extension!

BTW: While Windows practically forces you to add extensions to everything, you may very well call your programs without extension. Do it!

Ad Eclipse: yes, this sounds a bit inconvenient. Isn't there a plugin (yet) which guesstimates the file type in the absence of an extension? Unix file does a very good job at this.

And
Nobody expects the Spanish Inquisition
Or
CoolURIsDontChange wink

-- PeterKlausner - 24 Jun 2003

TWiki already supports both, scripts with and without extensions. Read the docs and TWiki.cfg. I don't think forcing the script extension is a good idea because of CoolURIsDontChange, and hide implementation details.

-- PeterThoeny - 24 Jun 2003

I meant to add: how a script appears to the outside world is a Webserver URI naming issue - one that is the responsibility of the HTTP Server configuration. IMO this would most elegantly solved using ShorterURLs - IMO the name of the script is irrelevant as I would have a CommonFrontEndCgiScript (with possible multiple names, one for each access type) and get the script work what it should do depending on PATH_INFO.

Further, my concern is about development not about deployment. Ideally the configurations should be the same but to me the development config should be optimal

While I feel strongly about ShorterURLs and CommonFrontEndCgiScript, I am less bothered about .PL extensions. I mainly mention it because I think it is a symptom of the underlying problem.

Re: Eclipse - it seems not yet (see the authors response at http://sourceforge.net/tracker/?func=detail&aid=731089&group_id=75859&atid=545275 - but do let me know if you find out different).

-- MartinCleaver - 25 Jun 2003

I agree with both Peter's smile ... VimEditor and other tools don't have a problem with identifying TWiki scripts as Perl - they just look for perl on the initial #! line, which is common practice in Unix editors.

It's not that hard for Eclipse users to write a script to rename the CGI scripts as needed.

-- RichardDonkin - 25 Jun 2003

Neither emacs nor Kate have trouble either. Maybe windows based applications need to catch up with 80s technology. (Hey, if vi and emacs are mentioned I think a unix/windows tease is fine? wink )

-- MichaelSparks - 25 Jun 2003

Eclipse does look nice, particularly the epic add-on which supports Perl.

-- RichardDonkin - 26 Jun 2003

The benefit of renaming the TWiki script files to have a extension would be that it makes things a lot easier for people editing in EPIC/Eclipse.

Eclipse is a very well put together development environment, but it does have a small drawback in that the main languages it's targetted for have file extensions. This means it was designed with the assumption that all the files would have a file extentions and it then leverages off that to know which editing plug-in to use. Unfortunately not having a file extension at all is the one file extension scenario it expressly doesn't allow setting a plug-in for, and it doesn't look like this will be addressed any time soon.

So, Eclipse's problem for sure, not TWiki's.

That being said however, Eclipse with the EPIC plug-in (e-p-i-c.sf.net, version 0.2.0 at the time of this writing) makes for a very powerful and efficient development environment, is cross platform, and also includes debugging functionality (breakpoints, variables watches, etc). So, it still may be worth the effort of doing the file rename if the use of Eclipse looks to be real win.

Hope that helps.

-- JustinClift - 23 May 2004

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2004-05-23 - JustinClift
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.