--- googlecode.com/svn/trunk/Meteor/Config.pm 2006/11/20 17:59:30 3 +++ googlecode.com/svn/trunk/Meteor/Config.pm 2008/02/03 23:10:24 42 @@ -60,11 +60,8 @@ 'Name of index file to serve when a directory is requested from the static file web server', DirectoryIndex => 'index.html', -'Header to be served with static documents. ~server~ and ~status~ will be replaced by the appropriate values', - DocumentHeaderTemplate => 'HTTP/1.1 ~status~\r\nServer: ~server~\r\nContent-Type: text/html; charset=utf-8\r\n\r\n', - 'Header template, ~server~, ~servertime~ and ~status~ will be replaced by the appropriate values. **NOTE**: It is possible to define more than one HeaderTemplate by appending a number at the end, for example *HeaderTemplate42*. Clients can request a specific header to be used by adding the parameter template= to their GET request. If *HeaderTemplate* is not found, the system will use the default HeaderTemplate (no number)', - HeaderTemplate => 'HTTP/1.1 ~status~\r\nServer: ~server~\r\nContent-Type: text/html; charset=utf-8\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store, must-revalidate\r\nExpires: Thu, 1 Jan 1970 00:00:00 GMT\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n', + HeaderTemplate => 'HTTP/1.1 ~status~\r\nServer: ~server~\r\nContent-Type: text/html; charset=utf-8\r\nPragma: no-cache\r\nCache-Control: no-cache, no-store, must-revalidate\r\nExpires: Thu, 1 Jan 1970 00:00:00 GMT\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n', 'Print out this help message', Help => '', @@ -81,8 +78,8 @@ 'Maximum duration in seconds for a subscriber connection to exist before forcing a it to close. Note that the server checks for expired connections in 60 second intervals, so small changes to this value will not have much of an effect. Use 0 to disable', MaxTime => 0, -'Message template, ~text~, ~id~ and ~timestamp~ will be replaced by the appropriate values', - MessageTemplate => '\r\n', +'Message template, ~text~, ~id~, ~channel~ and ~timestamp~ will be replaced by the appropriate values', + MessageTemplate => '\r\n', 'Interval at which PingMessage is sent to all persistent and identified subscriber connections (ie those including id=someuniqueidentifier in their request, and not specifying persist=0). Must be at least 3 if set higher than zero. Set to zero to disable.', PingInterval => 5, @@ -201,6 +198,19 @@ sub setCommandLineParameters { my $class=shift; + # + # Quick check if we should show the version, if so ignore everything else + # Accept -v, -version, and everything in between + # + foreach my $p (@_) + { + if(index($p,'-v')==0 && index('-version',$p)==0) + { + print "$::PGM $::VERSION\n"; + exit(0); + } + } + while(my $cnt=scalar(@_)) { my $k=shift(@_);