Return-Path: Mailing-List: contact modperl-cvs-help@apache.org; run by ezmlm Delivered-To: mailing list modperl-cvs@apache.org Received: (qmail 35923 invoked by uid 500); 17 Jul 2000 05:30:05 -0000 Delivered-To: apmail-modperl-site-cvs@apache.org Received: (qmail 35920 invoked by uid 1071); 17 Jul 2000 05:30:04 -0000 Date: 17 Jul 2000 05:30:04 -0000 Message-ID: <20000717053004.35918.qmail@locus.apache.org> From: richter@locus.apache.org To: modperl-site-cvs@apache.org Subject: cvs commit: modperl-site/embperl EmbperlObject.pod.5.html EmbperlObject.pod.6.html index.html richter 00/07/16 22:30:03 Modified: embperl index.html Added: embperl EmbperlObject.pod.5.html EmbperlObject.pod.6.html Log: Embperl Webpages - Changes Revision Changes Path 1.108 +5 -0 modperl-site/embperl/index.html Index: index.html =================================================================== RCS file: /home/cvs/modperl-site/embperl/index.html,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- index.html 2000/06/22 12:09:53 1.107 +++ index.html 2000/07/17 05:30:01 1.108 @@ -140,6 +140,11 @@ + 17. July 2000 + Embperl 1.3b4 released + + + 22. Juni 2000

@@ -297,7 +302,7 @@


HTML::Embperl - Copyright (c) 1997-2000 Gerald Richter / ECOS <richter@dev.ecos.de> - Last Update $Id: index.html,v 1.107 2000/06/22 12:09:53 richter Exp $

+ Last Update $Id: index.html,v 1.108 2000/07/17 05:30:01 richter Exp $

1.1 modperl-site/embperl/EmbperlObject.pod.5.html Index: EmbperlObject.pod.5.html =================================================================== Example for using method calls

Example for using method calls

________
[HOME]   [CONTENT]   [PREV (Basic Example)]   [NEXT (Author)]  

(Everything not given here is the same as in the example above)

/foo/base.htm:

 [!
   
   $req = shift ;
   
   sub new
      {
      my $self = shift ; 
  

    # here we attach some data to the request object
      $self -> {fontsize} = 3 ;
      }
  

 # Here we give a default title
   sub title { 'Title not given' } ;
  

 # here we call the method new
   $req -> new ;
   
   !]
  

 <html>
   <head>
   <title>[+ $req -> title +]</title>
   </head>
   <body>
   [- Execute ('head.htm') -]
   [- Execute ('*') -]
   [- Execute ('foot.htm') -]
   </body>
   </html>
  

/foo/head.htm:

 [# 
      here we use the fontsize
      Note that 
        $foo = $_[0] 
      is the same as writing 
        $foo = shift  
   #]
  

 <font size=[+ $_[0] -> {fontsize} +]>header</font>
  

/foo/sub/page2.htm:

 [!
  

 sub new
      {
      my $self = shift ; 
  

    # here we overwrite the new method form base.htm
      $self -> {fontsize} = 5 ;
      }
  

 # Here we overwrite the default title
   sub title { 'Title form page 2' } ;
  

 !]
  

 PAGE 2
  

  
  

[HOME]   [CONTENT]   [PREV (Basic Example)]   [NEXT (Author)]  
___________________________________________________________________________________
HTML::Embperl - Copyright (c) 1997-2000 Gerald Richter / ecos gmbh

1.1 modperl-site/embperl/EmbperlObject.pod.6.html Index: EmbperlObject.pod.6.html =================================================================== Author

Author

________
[HOME]   [CONTENT]   [PREV (Example for using method calls)]  

G. Richter (richter@dev.ecos.de)

[HOME]   [CONTENT]   [PREV (Example for using method calls)]  
___________________________________________________________________________________
HTML::Embperl - Copyright (c) 1997-2000 Gerald Richter / ecos gmbh