You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@locus.apache.org on 2000/08/10 21:32:48 UTC

cvs commit: embperl/Embperl Mail.pm

richter     00/08/10 12:32:47

  Modified:    .        Changes.pod Embperl.pod EmbperlD.pod
                        EmbperlObject.pm Faq.pod TODO epmain.c
               Embperl  Mail.pm
  Log:
     - Fixed a problem with POSTed data, which had got lost for the first,
       request when using EmbperlObject handler. Spotted by
       Kaare Rasmussen.
     - Fixed a typo in HTML::Embperl::Mail, spotted by Robert.
  
  Revision  Changes    Path
  1.120     +11 -0     embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- Changes.pod	2000/07/17 05:16:03	1.119
  +++ Changes.pod	2000/08/10 19:32:45	1.120
  @@ -1,5 +1,16 @@
   =pod
   
  +=head1 1.3b5_dev -- That's what currently under developement
  +
  +Last Update: <$localtime$> (MET)
  +
  +NOTE: This version is only available via L<"CVS"|CVS/"INTRO">
  +
  +   - Fixed a problem with POSTed data, which had got lost for the first,
  +     request when using EmbperlObject handler. Spotted by
  +     Kaare Rasmussen.
  +   - Fixed a typo in HTML::Embperl::Mail, spotted by Robert.
  +
   =head1 1.3b4 (BETA)  17.07.2000
   
      - New $escmode (or EMBPERL_ESCMODE) to disable the possiblilty
  
  
  
  1.51      +5 -0      embperl/Embperl.pod
  
  Index: Embperl.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pod,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Embperl.pod	2000/07/17 05:16:06	1.50
  +++ Embperl.pod	2000/08/10 19:32:45	1.51
  @@ -1624,6 +1624,11 @@
   B<NOTE:> The way B<uploadInfos> are accessed before 1.2b11 are not supported
   anymore.
   
  +B<NOTE:> This works the other
  +way as well: any input fields with names that are
  +%fdat keys, and without values, will have their values automatically set to
  +the appropriate %fdat value. See L<"HTML Tags"> C<INPUT/OPTION/TEXTAREA>. 
  +
   =head2 @ffld
   
   Contains all the field names in the order in which they were sent by
  
  
  
  1.24      +4 -0      embperl/EmbperlD.pod
  
  Index: EmbperlD.pod
  ===================================================================
  RCS file: /home/cvs/embperl/EmbperlD.pod,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- EmbperlD.pod	2000/07/17 05:16:06	1.23
  +++ EmbperlD.pod	2000/08/10 19:32:45	1.24
  @@ -1529,6 +1529,10 @@
   B<HINWEIS:> Der Zugriff auf die B<Upload-Infos> erfolgte vor 1.2b11 auf andere
   Art und Weise, die nicht mehr unterst�tzt wird.
   
  +B<HINWEIS:> Dies funktioniert ebenfalls in die andere Richtung. Bei Inputtags deren
  +Name einem %fdat Schl�ssel entspricht und die kein Value Attribute haben wird
  +automatisch der Wert aus %fdat als Value eingesetzt. Siehe L<"HTML Tags"> C<INPUT/OPTION/TEXTAREA>. 
  +
   =head2 @ffld
   
   Enth�lt alle Formularfeldnamen in der Reihenfolge, wie sie vom Browser 
  
  
  
  1.34      +10 -5     embperl/EmbperlObject.pm
  
  Index: EmbperlObject.pm
  ===================================================================
  RCS file: /home/cvs/embperl/EmbperlObject.pm,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- EmbperlObject.pm	2000/07/17 05:16:06	1.33
  +++ EmbperlObject.pm	2000/08/10 19:32:46	1.34
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: EmbperlObject.pm,v 1.33 2000/07/17 05:16:06 richter Exp $
  +#   $Id: EmbperlObject.pm,v 1.34 2000/08/10 19:32:46 richter Exp $
   #
   ###################################################################################
   
  @@ -529,9 +529,7 @@
   B</foo/base.htm:>
   
    [!
  - 
  - $req = shift ;
  - 
  +
    sub new
       {
       my $self = shift ; 
  @@ -543,10 +541,17 @@
    # Here we give a default title
    sub title { 'Title not given' } ;
   
  + !]
  +
  + [-
  +  
  + # get the request object of the current request
  + $req = shift ;
  +
    # here we call the method new
    $req -> new ;
  - 
  - !]
  +
  + -]
   
    <html>
    <head>
  
  
  
  1.15      +120 -0    embperl/Faq.pod
  
  Index: Faq.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Faq.pod,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Faq.pod	2000/05/02 04:41:37	1.14
  +++ Faq.pod	2000/08/10 19:32:46	1.15
  @@ -341,6 +341,126 @@
   
   
   
  +=head2 Is it possible to install EmbPerl into a private directory on my Unix/Linux Internet Service Provider account of which I have no root privilege?
  +
  +Like any other Perl module it can. Read "perldoc ExtUtils::MakeMaker",
  +to see which parameters are needed for Makefile.PL to change the installation
  +directory. Additionally, you have to change the @INC path to contain your 
  +private directory and possibly paths to other object files.
  +
  +Here are the brief details:
  +
  +B<Requirements>:
  +
  +=over 4
  +
  +=item *	At least Perl 5.004_04
  +
  +=item *	cc or gcc (your isp must give you access to the gcc compiler)
  +
  +=item *	URI
  +
  +=item *	MIME::Base64 
  +
  +=item *	HTML::Parser 
  +
  +=item *	HTML::HeadParser 
  +
  +=item *	Digest::MD5 
  +
  +=item *	libnet 
  +
  +=item *	libwww 
  +
  +=item *	File::Spec (I believe you may have to install this too if you are using Perl 5.004_04 as it may not be a standard module)
  +
  +=back
  +
  +B<Direction>:
  +
  +=over 4
  +
  +=item *	Get your copy of EmbPerl (HTML-Embperl-x.x.tar.gz)
  +
  +
  +=item *	% tar -xvzf HTML-Embperl-x.x.tar.gz
  +
  +=item *	% cd HTML-Embperl-x.x
  +
  +=item *	% perl Makefile.PL PREFIX=/to/your/private/dir
  +
  +=item *	% make
  +
  +=item *	% make test
  +
  +=item *	% make install
  +
  +=back
  +
  +
  +Replace /to/your/private/dir with the path to the directory you want the  module to be placed in. Now preface your CGI scripts with something like  this:
  +
  +
  +
  +[Alternative 1]
  +
  +	#!/usr/bin/perl -wT
  +	use CGI::Carp qw( fatalsToBrowser ); #recommend using this to report errors on die or warn to browser
  +	
  +	use lib '/to/your/private/dir/lib'; #for FILE::Spec
  +	use lib '/to/your/private/dir/'; #to find Embperl
  +	use lib '/to/your/private/dir/i386-linux/auto/HTML/Embperl'; #to find Embperl compiled stuff
  +	
  +	#if for some very weird reason the above 'use lib' pragma directive doesn't work, see Alternative 2
  +	
  +	use HTML::Embperl;
  +	
  +	#your code below ...
  +
  +
  +
  +[Alternative 2]
  +
  +	#!/usr/bin/perl -wT
  +	use CGI::Carp qw( fatalsToBrowser ); #recommend using this to report errors on die or warn to browser
  +	
  +	BEGIN {
  +		unshift @INC, '/to/your/private/dir/lib'; #for FILE::Spec
  +		unshift @INC, '/to/your/private/dir/'; #to find Embperl
  +		unshift @INC, '/to/your/private/dir/i386-linux/auto/HTML/Embperl'; #to find Embperl compiled stuff
  +	}
  +	
  +	use HTML::Embperl;
  +	
  +	#your code below ...
  +
  +
  +When you make test, you may encounter superfluous warnings, you may want to change the test.pl that ships with EmbPerl from
  +
  +
  +	BEGIN 
  +	    { 
  +	    $fatal  = 1 ;
  +
  +to
  +
  +	BEGIN 
  +	    { 
  +	    unshift @INC, '/to/your/private/dir/lib';
  +	    $fatal  = 1 ;
  +	    ...
  +
  +because the test.pl may not be able to find FILE::Spec if you have it installed on a private directory for Perl 5.004_04.
  +
  +Do something similar to the important file embpcgi.pl as you do for all your CGI scripts, like modifying the @INC as shown above, to allow perl to find in particular the EmbPerl shared obj files...
  +
  +And when you invoke your CGI scripts like so,
  +
  +http://www.yourdomain.com/cgi-bin/embpcgi.pl/templateFiles/myNifty.epl
  +
  +the script should work.
  +
  +
   
   =head1 Common Problems
   
  
  
  
  1.95      +4 -0      embperl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/embperl/TODO,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- TODO	2000/07/17 05:16:08	1.94
  +++ TODO	2000/08/10 19:32:46	1.95
  @@ -66,6 +66,8 @@
   
   - APache::Session 1.5
   
  +- cookie form $req_rec [Jack Cushman 27.7.00]
  +
   Test
   ----
   - test FORBIDDEN
  @@ -91,6 +93,8 @@
   - using outputfile inside a outputfile crashs
   
   - entity decoding radi/checkboxes [Chris Thorman 20.6.00]
  +
  +- %fdat not resetup with mulpart/formdata [Michael Slade 19.7.00]
   
   Docs
   ----
  
  
  
  1.70      +3 -1      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- epmain.c	2000/07/17 05:16:08	1.69
  +++ epmain.c	2000/08/10 19:32:46	1.70
  @@ -2902,7 +2902,9 @@
       SetupSafeNamespace (r) ;
   
       /* --- read form data from browser if not already read by perl part --- */
  -    if (rc == ok && !(r -> bOptions & optDisableFormData) && av_len (r -> pFormArray) == -1 && !r -> bSubReq) 
  +    if (rc == ok && !(r -> bOptions & optDisableFormData) && 
  +	            av_len (r -> pFormArray) == -1 && !r -> bSubReq && 
  +		    r -> pImportStash == NULL) 
           rc = GetInputData_CGIScript (r) ;
       
       /* --- open output and send http header if EarlyHttpHeaders --- */
  
  
  
  1.28      +1 -1      embperl/Embperl/Mail.pm
  
  Index: Mail.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Mail.pm,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Mail.pm	2000/07/17 05:16:20	1.27
  +++ Mail.pm	2000/08/10 19:32:47	1.28
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Mail.pm,v 1.27 2000/07/17 05:16:20 richter Exp $
  +#   $Id: Mail.pm,v 1.28 2000/08/10 19:32:47 richter Exp $
   #
   ###################################################################################
   
  @@ -65,7 +65,7 @@
   
           my $smtp = Net::SMTP->new($req -> {mailhost},
                                     Debug => ($req -> {maildebug} || $ENV{'EMBPERL_MAILDEBUG'} || 0),
  -                                  $helo?(Hello => $helo):()) 
  +                                  ($helo?(Hello => $helo):()) 
                                     ) or die "Cannot connect to mailhost $req->{mailhost}" ;
   
           my $from =  $req -> {from} || $ENV{'EMBPERL_MAILFROM'} ;