perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Helm" <jjh...@att.net>
Subject Switch.pm not working under Apache::ASP
Date Tue, 18 Jun 2002 02:39:39 GMT
Just thought I'd see if anyone else had successfully used Switch.pm
under Apache::ASP.  When I try, I get the following (which works fine
under straight perl).  I'm assuming it's the magical syntax
altering/creating nature of the Switch module that's causing it to fail.
I even tried loading Switch.pm in my startup.pl before Apache::ASP, and
still no dice.

Any ideas?  If it's not a simple thing to fix, I'll just fall back on
the tried and true foreach or if/elsif/else contructs, but it sure would
be nice to start using given/when now...

Thanks,

Jim
--

----file: t.asp

# <%

use Switch;

my $x = 'x';

switch ($x) {
    case 'x' { print 'x' }
    else { print 'not x' }
}

# %>

----output:
Errors Output 
syntax error at t.asp line 7, near ") {" ,
/appl/amps/perlx/lib//Apache/ASP.pm line 1607... see compile error for
rest 

Debug Output 
syntax error at t.asp line 7, near ") {" ,
/appl/amps/perlx/lib//Apache/ASP.pm line 1607 ... 

Compile Error

syntax error at t.asp line 7, near ") {"
 ...

Compiled Data with Error 

  -: package AWS::ActLog2; ;; sub
AWS::ActLog2::__ASP_____DEV1580007_INODE682Axfb66e15d72bfcd9a443c4de069c
c92ac {  ;; package AWS::ActLog2; ;; use strict;;use vars
qw($Application $Session $Response $Server $Request);;use lib
qw(/v01/data/web/apps/ActLog2//.);;;
  -: #line 1 t.asp
  1: ; &ASP::WriteRef($main::Response, \('# '));
  2: 
  3: use Switch;
  4: 
  5: my $x = 'x';
  6: 
  7: switch ($x) {
  8:     case ('x') { print 'x' }
  9:     else { print 'not x' }
 10: }
 11: 
 12: # 
 13: ; ;;no lib qw(/v01/data/web/apps/ActLog2//.); ;; }


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message