Apache-ASP

 view release on metacpan or  search on metacpan

ASP.pm  view on Meta::CPAN

    close READFILE;

    \$data;
}

# if the $file is an absolute path, then just return the file
# if the $file is a relative path, concat it with the passed in directory
sub AbsPath {
    my($file, $dir) = @_;

    # we test for first unix style and then win32 style path conventions
    if($file =~ m|^/| or $file =~ m|^.\:|) {
	$file;
    } else {
	# we only can absolute the path if the directory path is absolute
	if($dir =~ m|^/| or $dir =~ m|^.\:|) {
	    $file = $dir.'/'.$file;
	} else {
	    $file;
	}
    }

ASP.pm  view on Meta::CPAN

			$meta->{Timeout} = $meta->{Creation} + $expires;
			$cache_dbm->STORE($metakey, $meta);
		    };
		}
		
		# LastModified calculations
		if(defined $last_modified) {
		    if($last_modified !~ /^\d+$/) {
			my $old_last_modified = $last_modified;
			$last_modified = &Apache::ASP::Date::str2time($last_modified);
			$self->{dbg} && $self->Debug("converting string date for LastModified $old_last_modified to unix time $last_modified");
		    }
		    if($last_modified < 0) {
			$self->{dbg} && $self->Debug("negative LastModified $last_modified ignored");
			$last_modified = undef;
		    }
		}
		
		# EARLY TIMEOUT CALCULATION
		if($meta->{Timeout}) {
		    # 10% chance to expire early to prevent collision

ASP.pm  view on Meta::CPAN


=head1 WEBSITE

The Apache::ASP web site is at http://www.apache-asp.org/
which you can also find in the ./site directory of 
the source distribution.

=head1 INSTALL

The installation process for Apache::ASP is geared towards those
with experience with Perl, Apache, and unix systems.  For those
without this experience, please understand that the learning curve 
can be significant.  But what you have at the end will be a web site
running on superior open source software.

If installing onto a Windows operating system, please see the section
titled Win32 Install.

=head2 Need Help

Often, installing the mod_perl part of the Apache server

ASP.pm  view on Meta::CPAN

I would leave this on, since error handling is poor, if your asp 
script errors after sending only some of the output.

  PerlSetVar BufferingOn 1

=item InodeNames

Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case of 
multiple symbolic links pointing to the same script this will result 
in the script being compiled only once. Use only on unix flavours
which support the stat() call that know about device and inode 
numbers.

  PerlSetVar InodeNames 1

=item RequestParams

Default 0, if set creates $Request->Params object with combined 
contents of $Request->QueryString and $Request->Form.  This
is for developer convenience simlar to CGI.pm's param() method.

ASP.pm  view on Meta::CPAN

Sends a response header to the client with $date being an absolute
time to expire.  Formats accepted are all those accepted by 
HTTP::Date::str2time(), e.g.

 "Wed, 09 Feb 1994 22:23:32 GMT"     -- HTTP format
 "Tuesday, 08-Feb-94 14:15:29 GMT"   -- old rfc850 HTTP format

 "08-Feb-94"       -- old rfc850 HTTP format    
 "09 Feb 1994"     -- proposed new HTTP format  

 "Feb  3  1994"    -- Unix 'ls -l' format
 "Feb  3 17:03"    -- Unix 'ls -l' format

=item $Response->{FormFill} = 0|1

If true, HTML forms generated by the script output will
be auto filled with data from $Request->Form.  This feature
requires HTML::FillInForm to be installed.  Please see
the FormFill CONFIG for more information.

This setting overrides the FormFill config at runtime
for the script execution only.

ASP.pm  view on Meta::CPAN

a great amount of work, and is not guaranteed to be portable with other perl 
ASP implementations, as other ASP implementations will likely be more limited.

=over

=item Standalone CGI Mode, without mod_perl

As of version 2.19, Apache::ASP scripts may be run as standalone
CGI scripts without mod_perl being loaded into Apache.  Work
to date has only been done with mod_cgi scripts under Apache on a
Unix platform, and it is unlikely to work under other web servers 
or Win32 operating systems without further development.

To run the ./site/eg scripts as CGI scripts, you copy the 
./site directory to some location accessible by your web
server, in this example its /usr/local/apache/htdocs/aspcgi, 
then in your httpd.conf activate Apache::ASP cgi
scripts like so:

 Alias /aspcgi/ /usr/local/apache/htdocs/aspcgi/
 <Directory /usr/local/apache/htdocs/aspcgi/eg/ >

ASP.pm  view on Meta::CPAN

 :) Darren Gibbons, the biggest cookie-monster I have ever known.
 :) Ken Williams, for great teamwork bringing full SSI to the table
 :) Matt Sergeant, for his great tutorial on PerlScript and love of ASP
 :) Jeff Groves, who put a STOP to user stop button woes
 :) Alan Sparks, for knowing when size is more important than speed
 :) Lincoln Stein, for his blessed CGI.pm module
 :) Michael Rothwell, for his love of Session hacking
 :) Francesco Pasqualini, for bringing ASP to CGI
 :) Bryan Murphy, for being a PerlScript wiz
 :) Lupe Christoph, for his immaculate and stubborn testing skills
 :) Ryan Whelan, for boldly testing on Unix in the early infancy of ASP

=head1 SUPPORT

=head2 COMMUNITY

=item Mailing List Archives

Try the Apache::ASP mailing list archive first when working
through an issue as others may have had the same question
as you, then try the mod_perl list archives since often

ASP.pm  view on Meta::CPAN

  $Session + $Application than DB_File, yet still overcomes
  SDBM_File's 1024 bytes value limitation.  Documented in 
  StateDB config, and added Makefile.PL entry.

 +Removed deprecated MD5 use and replace with Digest::MD5 calls

 +PerlSetVar InodeNames 1 config which will compile scripts hashed by 
  their device & inode identifiers, from a stat($file)[0,1] call.
  This allows for script directories, the Global directory,
  and IncludesDir directories to be symlinked to without
  recompiling identical scripts.  Likely only works on Unix
  systems.  Thanks to Ime Smits for this one.

 +Streamlined code internally so that includes & scripts were
  compiled by same code.  This is a baby step toward fusing
  include & script code compilation models, leading to being
  able to compile bits of scripts on the fly as ASP subs, 
  and being able to garbage collect ASP code subroutines.

 -removed @_ = () in script compilation which would trigger warnings 
  under PerlWarn being set, thanks for Carl Lipo for reporting this.

ASP.pm  view on Meta::CPAN

	: print "Set-Cookie: test=cookie\n", and things will just work
	: use CGI.pm for output
	: utilizes $r->send_cgi_header(), thanks Doug!

 +Improved Cookie implementation, more flexible and complete
	- Domain cookie key now works
	: Expire times now taken from time(), and relative time in sec
	: Request->Cookies() reading more flexible, with wantarray()
	  on hash cookie values, %hash = $Request->Cookie('test');

 -make test module naming correction, was t.pm, now T.pm for Unix

 +POD / README cleanup, formatting and HTML friendly.


=item $VERSION = 0.03; $DATE="09/14/1998";

 +Installation 'make test' now works

 +ActiveX objects on Win32 implemented with $Server->CreateObject() 

README  view on Meta::CPAN


    For database access, ActiveX, scripting languages, and other miscellaneous
    issues please read the FAQ section.

WEBSITE
    The Apache::ASP web site is at http://www.apache-asp.org/ which you can also
    find in the ./site directory of the source distribution.

INSTALL
    The installation process for Apache::ASP is geared towards those with
    experience with Perl, Apache, and unix systems. For those without this
    experience, please understand that the learning curve can be significant.
    But what you have at the end will be a web site running on superior open
    source software.

    If installing onto a Windows operating system, please see the section titled
    Win32 Install.

  Need Help
    Often, installing the mod_perl part of the Apache server can be the hardest
    part. If this is the case for you, check out the FAQ and SUPPORT sections

README  view on Meta::CPAN


        I would leave this on, since error handling is poor, if your asp script
        errors after sending only some of the output.

          PerlSetVar BufferingOn 1

    InodeNames
        Default 0. Set to 1 to uses a stat() call on scripts and includes to
        derive subroutine namespace based on device and inode numbers. In case
        of multiple symbolic links pointing to the same script this will result
        in the script being compiled only once. Use only on unix flavours which
        support the stat() call that know about device and inode numbers.

          PerlSetVar InodeNames 1

    RequestParams
        Default 0, if set creates $Request->Params object with combined contents
        of $Request->QueryString and $Request->Form. This is for developer
        convenience simlar to CGI.pm's param() method.

          PerlSetVar RequestParams 1

README  view on Meta::CPAN

        Sends a response header to the client with $date being an absolute time
        to expire. Formats accepted are all those accepted by
        HTTP::Date::str2time(), e.g.

         "Wed, 09 Feb 1994 22:23:32 GMT"     -- HTTP format
         "Tuesday, 08-Feb-94 14:15:29 GMT"   -- old rfc850 HTTP format

         "08-Feb-94"       -- old rfc850 HTTP format    
         "09 Feb 1994"     -- proposed new HTTP format  

         "Feb  3  1994"    -- Unix 'ls -l' format
         "Feb  3 17:03"    -- Unix 'ls -l' format

    $Response->{FormFill} = 0|1
        If true, HTML forms generated by the script output will be auto filled
        with data from $Request->Form. This feature requires HTML::FillInForm to
        be installed. Please see the FormFill CONFIG for more information.

        This setting overrides the FormFill config at runtime for the script
        execution only.

    $Response->{IsClientConnected}

README  view on Meta::CPAN

    available. See "Standalone CGI Mode" section below.

    Following are some special notes with respect to compatibility with CGI and
    CGI.pm. Use of CGI.pm in any of these ways was made possible through a great
    amount of work, and is not guaranteed to be portable with other perl ASP
    implementations, as other ASP implementations will likely be more limited.

    Standalone CGI Mode, without mod_perl
        As of version 2.19, Apache::ASP scripts may be run as standalone CGI
        scripts without mod_perl being loaded into Apache. Work to date has only
        been done with mod_cgi scripts under Apache on a Unix platform, and it
        is unlikely to work under other web servers or Win32 operating systems
        without further development.

        To run the ./site/eg scripts as CGI scripts, you copy the ./site
        directory to some location accessible by your web server, in this
        example its /usr/local/apache/htdocs/aspcgi, then in your httpd.conf
        activate Apache::ASP cgi scripts like so:

         Alias /aspcgi/ /usr/local/apache/htdocs/aspcgi/
         <Directory /usr/local/apache/htdocs/aspcgi/eg/ >

README  view on Meta::CPAN

     :) Darren Gibbons, the biggest cookie-monster I have ever known.
     :) Ken Williams, for great teamwork bringing full SSI to the table
     :) Matt Sergeant, for his great tutorial on PerlScript and love of ASP
     :) Jeff Groves, who put a STOP to user stop button woes
     :) Alan Sparks, for knowing when size is more important than speed
     :) Lincoln Stein, for his blessed CGI.pm module
     :) Michael Rothwell, for his love of Session hacking
     :) Francesco Pasqualini, for bringing ASP to CGI
     :) Bryan Murphy, for being a PerlScript wiz
     :) Lupe Christoph, for his immaculate and stubborn testing skills
     :) Ryan Whelan, for boldly testing on Unix in the early infancy of ASP

SUPPORT
  COMMUNITY
    Mailing List Archives
        Try the Apache::ASP mailing list archive first when working through an
        issue as others may have had the same question as you, then try the
        mod_perl list archives since often problems working with Apache::ASP are
        really mod_perl ones.

        The Apache::ASP mailing list archives are located at:

README  view on Meta::CPAN

          $Session + $Application than DB_File, yet still overcomes
          SDBM_File's 1024 bytes value limitation.  Documented in 
          StateDB config, and added Makefile.PL entry.

         +Removed deprecated MD5 use and replace with Digest::MD5 calls

         +PerlSetVar InodeNames 1 config which will compile scripts hashed by 
          their device & inode identifiers, from a stat($file)[0,1] call.
          This allows for script directories, the Global directory,
          and IncludesDir directories to be symlinked to without
          recompiling identical scripts.  Likely only works on Unix
          systems.  Thanks to Ime Smits for this one.

         +Streamlined code internally so that includes & scripts were
          compiled by same code.  This is a baby step toward fusing
          include & script code compilation models, leading to being
          able to compile bits of scripts on the fly as ASP subs, 
          and being able to garbage collect ASP code subroutines.

         -removed @_ = () in script compilation which would trigger warnings 
          under PerlWarn being set, thanks for Carl Lipo for reporting this.

README  view on Meta::CPAN

                : print "Set-Cookie: test=cookie\n", and things will just work
                : use CGI.pm for output
                : utilizes $r->send_cgi_header(), thanks Doug!

         +Improved Cookie implementation, more flexible and complete
                - Domain cookie key now works
                : Expire times now taken from time(), and relative time in sec
                : Request->Cookies() reading more flexible, with wantarray()
                  on hash cookie values, %hash = $Request->Cookie('test');

         -make test module naming correction, was t.pm, now T.pm for Unix

         +POD / README cleanup, formatting and HTML friendly.

    $VERSION = 0.03; $DATE="09/14/1998";
         +Installation 'make test' now works

         +ActiveX objects on Win32 implemented with $Server->CreateObject() 

         +Cookies implemented: $Response->Cookies() & $Request->Cookies()

lib/Apache/ASP/Date.pm  view on Meta::CPAN

	    \s+
	 (\d\d?):(\d\d)        # hour:min
	 (?::(\d\d))?          # optional seconds
	    \s+
	 (?:(GMT|gmt)\s+)?     # optional GMT timezone
	 (\d+)                 # year
	    \s*$               # allow trailing whitespace
	/x
	  and last PARSEDATE;

      # Then the Unix 'ls -l' date format
      ($mon, $day, $yr, $hr, $min, $sec) =
	/^\s*
	 (\w{3})               # month
	    \s+
	 (\d\d?)               # day
	    \s+
	 (?:
	    (\d\d\d\d) |       # year
	    (\d{1,2}):(\d{2})  # hour:min
            (?::(\d\d))?       # optional seconds

lib/Apache/ASP/Date.pm  view on Meta::CPAN

   return undef if $yr > 99 && $yr < 1900;  # We ignore these years
   $yr += 100 if $yr < 50;  # a stupid thing to do???
   $yr -= 1900 if $yr >= 1900;
   # The $yr is now relative to 1900 (as expected by timelocal())

   # timelocal() seems to go into an infinite loop if it is given out
   # of range parameters.  Let's check the year at least.

   # Epoch counter maxes out in year 2038, assuming "time_t" is 32 bit
   return undef if $yr > 138;
   return undef if $yr <  70;  # 1970 is Unix epoch

   # Compensate for AM/PM
   if ($aorp) {
       $aorp = uc $aorp;
       $hr = 0 if $hr == 12 && $aorp eq 'AM';
       $hr += 12 if $aorp eq 'PM' && $hr != 12;
   }

   # Make sure things are defined
   for ($sec, $min, $hr) {  $_ = 0 unless defined   }

lib/Apache/ASP/Server.pm  view on Meta::CPAN

    bless {asp => $_[0]};
}

sub CreateObject {
    my($self, $name) = @_;
    my $asp = $self->{asp};

    # dynamically load OLE at request time, especially since
    # at server startup, this seems to fail with "start_mutex" error
    #
    # no reason to preload this unix style when module loads
    # because in win32, threaded model does not need this prefork 
    # parent httpd compilation
    #
    unless(defined $OLESupport) {
	eval 'use Win32::OLE';
	if($@) {
	    $OLESupport = 0;
	} else {
	    $OLESupport = 1;
	}

site/cgi.html  view on Meta::CPAN

	<hr size=1>
	<p>

	<p>
	<a name=Standalone%20Cbddd74cc></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Standalone CGI Mode, without mod_perl</b></font>
<font face="courier new" size=3><pre>
</pre></font>As of version 2.19, Apache::ASP scripts may be run as standalone
<a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> scripts without mod_perl being loaded into Apache.  Work
to date has only been done with mod_cgi scripts under Apache on a
Unix platform, and it is unlikely to work under other web servers 
or Win32 operating systems without further development.
<font face="courier new" size=3><pre>
</pre></font>To run the ./site/eg scripts as CGI scripts, you copy the 
./site directory to some location accessible by your web
server, in this example its /usr/local/apache/htdocs/aspcgi, 
then in your httpd.conf activate Apache::ASP cgi
scripts like so:
<font face="courier new" size=3><pre>
 Alias /aspcgi/ /usr/local/apache/htdocs/aspcgi/
 &lt;Directory /usr/local/apache/htdocs/aspcgi/eg/ &gt;

site/changes.html  view on Meta::CPAN

  $Session + $Application than DB_File, yet still overcomes
  SDBM_File&#39;s 1024 bytes value limitation.  Documented in 
  StateDB config, and added Makefile.PL entry.

 +Removed deprecated MD5 use and replace with Digest::MD5 calls

 +PerlSetVar InodeNames 1 config which will compile scripts hashed by 
  their device &amp; inode identifiers, from a stat($file)[0,1] call.
  This allows for script directories, the Global directory,
  and IncludesDir directories to be symlinked to without
  recompiling identical scripts.  Likely only works on Unix
  systems.  Thanks to Ime Smits for this one.

 +Streamlined code internally so that includes &amp; scripts were
  compiled by same code.  This is a baby step toward fusing
  include &amp; script code compilation models, leading to being
  able to compile bits of scripts on the fly as ASP subs, 
  and being able to garbage collect ASP code subroutines.

 -removed @_ = () in script compilation which would trigger warnings 
  under PerlWarn being set, thanks for Carl Lipo for reporting this.

site/changes.html  view on Meta::CPAN

	: print &quot;Set-Cookie: test=cookie\n&quot;, and things will just work
	: use CGI.pm for output
	: utilizes $r-&gt;send_cgi_header(), thanks Doug!

 +Improved Cookie implementation, more flexible and complete
	- Domain cookie key now works
	: Expire times now taken from time(), and relative time in sec
	: Request-&gt;Cookies() reading more flexible, with wantarray()
	  on hash cookie values, %hash = $Request-&gt;Cookie(&#39;test&#39;);

 -make test module naming correction, was t.pm, now T.pm for Unix

 +POD / README cleanup, formatting and HTML friendly.
</pre></font>
	
	<p>
	<a name=%24VERSION%20%3D%200ec664faf></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.03; $DATE="09/14/1998";</b></font>
<font face="courier new" size=3><pre>
 +Installation &#39;make test&#39; now works

site/config.html  view on Meta::CPAN

  PerlSetVar BufferingOn 1
</pre></font>
	
	<p>
	<a name=InodeNames></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>InodeNames</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case of 
multiple symbolic links pointing to the same script this will result 
in the script being compiled only once. Use only on unix flavours
which support the stat() call that know about device and inode 
numbers.
<font face="courier new" size=3><pre>
  PerlSetVar InodeNames 1
</pre></font>
	
	<p>
	<a name=RequestParam25a784ba></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>RequestParams</b></font>
<font face="courier new" size=3><pre>

site/install.html  view on Meta::CPAN

</td>



<td valign=top bgcolor=white>
<font size=+0 face=verdana,arial>

<font face=verdana><font class=title size=+1 color=#555555><b>INSTALL</b></font>
<font face="courier new" size=3><pre>
</pre></font>The installation process for Apache::ASP is geared towards those
with experience with Perl, Apache, and unix systems.  For those
without this experience, please understand that the learning curve 
can be significant.  But what you have at the end will be a web site
running on superior open source software.
<font face="courier new" size=3><pre>
</pre></font>If installing onto a Windows operating system, please see the section
titled Win32 Install.</font>

	<hr size=1>
	<table width=100% border=0 cellpadding=1 cellspacing=3>
	<tr>

site/kudos.html  view on Meta::CPAN

 :) Darren Gibbons, the biggest cookie-monster I have ever known.
 :) Ken Williams, for great teamwork bringing full SSI to the table
 :) Matt Sergeant, for his great tutorial on PerlScript and love of ASP
 :) Jeff Groves, who put a STOP to user stop button woes
 :) Alan Sparks, for knowing when size is more important than speed
 :) Lincoln Stein, for his blessed CGI.pm module
 :) Michael Rothwell, for his love of Session hacking
 :) Francesco Pasqualini, for bringing ASP to CGI
 :) Bryan Murphy, for being a PerlScript wiz
 :) Lupe Christoph, for his immaculate and stubborn testing skills
 :) Ryan Whelan, for boldly testing on Unix in the early infancy of ASP
</pre></font>

</font>
</td>

<td bgcolor=white valign=top>
&nbsp;
</td>

</tr>

site/objects.html  view on Meta::CPAN

</pre></font>Sends a response header to the client with $date being an absolute
time to expire.  Formats accepted are all those accepted by 
HTTP::Date::str2time(), e.g.
<font face="courier new" size=3><pre>
 &quot;Wed, 09 Feb 1994 22:23:32 GMT&quot;     -- HTTP format
 &quot;Tuesday, 08-Feb-94 14:15:29 GMT&quot;   -- old rfc850 HTTP format

 &quot;08-Feb-94&quot;       -- old rfc850 HTTP format    
 &quot;09 Feb 1994&quot;     -- proposed new HTTP format  

 &quot;Feb  3  1994&quot;    -- Unix &#39;ls -l&#39; format
 &quot;Feb  3 17:03&quot;    -- Unix &#39;ls -l&#39; format
</pre></font>
	
	<p>
	<a name=%24Response-%3E%7Bf2167225></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>$Response->{FormFill} = 0|1</b></font>
<font face="courier new" size=3><pre>
</pre></font>If true, HTML forms generated by the script output will
be auto filled with data from $Request-&gt;Form.  This feature
requires HTML::FillInForm to be installed.  Please see
the FormFill <a href=config.html><font size=-1 face=verdana><b>CONFIG</b></font></a> for more information.



( run in 1.098 second using v1.01-cache-2.11-cpan-39bf76dae61 )