richter     02/03/05 04:46:02

  Modified:    .        Tag: Embperl2c Changes.pod README.v2
               driver   Tag: Embperl2c epxalan.cpp
               xsbuilder/maps Tag: Embperl2c ep_structure.map
  Log:
  sun fixes + doc updates
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.129.4.49 +7 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.129.4.48
  retrieving revision 1.129.4.49
  diff -u -r1.129.4.48 -r1.129.4.49
  --- Changes.pod       5 Mar 2002 08:07:20 -0000       1.129.4.48
  +++ Changes.pod       5 Mar 2002 12:46:01 -0000       1.129.4.49
  @@ -31,6 +31,13 @@
        with Embperl.
      - Added EMBPERL_APP_HANDLER_CLASS to set the application object
        for Embperl pages, when not using Embperl::Object
  +   - Embperl now uses nativ Apache configuration directives instead
  +     of enviroment variables when running under mod_perl. You have
  +     to add the following lines to the top of your httpd.conf:
  +
  +       PerlModule Embperl
  +       AddModule embperl.c
  +
      - Added [= foo =] block and $r -> gettext method for page localization. 
        When the page is executed the 'foo' is replaced with a localizied
        message for the current language.
  
  
  
  1.1.4.24  +414 -44   embperl/Attic/README.v2
  
  Index: README.v2
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/README.v2,v
  retrieving revision 1.1.4.23
  retrieving revision 1.1.4.24
  diff -u -r1.1.4.23 -r1.1.4.24
  --- README.v2 5 Mar 2002 11:20:11 -0000       1.1.4.23
  +++ README.v2 5 Mar 2002 12:46:02 -0000       1.1.4.24
  @@ -1,4 +1,4 @@
  -HTML::Embperl - Building dynamic Websites with Perl
  +Embperl - Building dynamic Websites with Perl
   
   Copyright (c) 1997-2002 Gerald Richter / ecos gmbh  www.ecos.de
   
  @@ -9,7 +9,7 @@
   WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 
   MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   
  -$Id: README.v2,v 1.1.4.23 2002/03/05 11:20:11 richter Exp $
  +$Id: README.v2,v 1.1.4.24 2002/03/05 12:46:02 richter Exp $
   
   
   ### !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! 
  @@ -30,15 +30,18 @@
   Hints for using Embperl 2.x
   ---------------------------
   
  -Embperl 2 has a totaly rewritten core. It contains nearly 7500 lines 
  -new (mostly C-) code. Although I have done a lot of testing, there may
  -be still undiscovered bugs!
  +Embperl 2 is totaly rewritten. Most of the Perl code is moved 
  +into C to speed up processing. The core is totaly redesigned to
  +give a lot of new possibilities.
   
  +This is still beta, so it may (and will) contains bugs.
   Please report any weird behaviour to the embperl mailing list, but
   be sure to read this whole README to understand what doesn't work yet.
   
  -The Embperl core now works in a totaly different way. It is divided into
  -smaller steps:
  +The Embperl core now works in a totaly different way. The processing
  +of the source towards the output is done by providers. Every provider
  +takes a small step. Which providers are used is defined by a recipe.
  +The standard Embperl recipe contains the following providers:
   
       1 reading the source
       2 parsing 
  @@ -46,25 +49,24 @@
       4 executing
       5 outputing
   
  -Subsequent versions will allow replacing every single step of this pipeline
  -with custom modules. Also it will be possible to cascade multiple
  -processors. This allows, for example, having Embperl and SSI in one file
  -and parsing the file just once, feeding it first to the SSI processor and
  -afterwards to the Embperl processor. Also the parser will be exchangeable
  -in future version to allow for example the use of an XML parser and an
  -XSLT stylesheet processor.
  +The providers works in a similar way as Unix shell programm which are
  +processing a single source in a pipeline towards the output. In
  +Embperl is is not only a smimple pipeline, but a tree structure,
  +so multiple sources can be incorpoarted in one result.
  +Rearrangeing the provideres or writing and useing new ones gives
  +flexibility and power. Addtional to the standart Embperl providers
  +Embperl ships with XML parser and XSLT processor providers.
   
   The new execution scheme is also faster, because html tags and metacommands
   are parsed only once (Perl code was also (and is still) cached in 1.x)
  -My first benchmarks show 50%-100% faster execution under mod_perl for pages
  -longer then 20K (For short pages ( < 5K ouput) you won't see such a great 
difference)
  -and without any external database access.
  +My first benchmarks show 50%-100% faster execution under mod_perl 
  +compared to Embperl 1.x.
   
   Another new feature is that the syntax of the Embperl parser is defined
  -within the module HTML::Embperl::Syntax and can be modified as nessecary.
  +within the module Embperl::Syntax and can be modified as nessecary.
   Embperl comes with a set of syntax definitons which can be modified by
   the user. So far there are syntax definitions for SSI, Text only, Perl only,
  -ASP and a Mail taglib. You can tell Embperl which syntax to use either in
  +ASP, POD, RTF and a Mail taglib. You can tell Embperl which syntax to use either in
   the configuration via EMBPERL_SYNTAX, or with the syntax parameter of
   Execute, or you can change the syntax dynamically inside the page via the
   [$syntax $] command. You also could specify more then one syntax at the same
  @@ -73,13 +75,37 @@
   
   If you'd like to create your own syntax read:
   
  -   perldoc HTML::Embperl::Syntax
  +   perldoc Embperl::Syntax
   
   and look at the files under Embperl/Syntax/ for examples on how to do it.
   
   Also new is the ability to cache (parts of) the output. See
   the new configuration directives below.
   
  +Starting with 2.0b6 Embperl provides a set of new object, which allows
  +to access Embperl internals and manipulate the processing. Basicly there
  +are three major objects:
  +
  +    - Application
  +    - Request
  +    - Component
  +
  +The application object is responsible for a set of pages that forms an
  +application. It is used to configure things like session handling and
  +logging which should be unique across these pages. More important
  +it can be overriden and the overriden object can contain the application
  +logic, to create a proper separation of logic and presentation.
  +
  +The request object holds everything which spans a whole (HTTP-)request.
  +
  +The component object is responsible for a single component, inside the
  +desired output. It holds things like sourcefile etc.
  +
  +All three object has subobject which holds the configuration and a
  +subobject for it's current parameters.
  +
  +See below for a sort list of accessable members.
  +
   
   Debugging
   ---------
  @@ -108,6 +134,18 @@
   The following differences to Embperl 1.x apply:
   ------------------------------------------------------
   
  +- When running under mod_perl the following lines are 
  +  now required to laod Embperl:
  +
  +  PerlModule Embperl
  +  AddModule embperl.c
  +
  +  You can use the Embperl configuration directives now
  +  directly, (which  out PerlSetEnv/SetEnv). If you still
  +  want to use enviroment varibales to configure EMbperl, write
  +
  +  Embperl_UseEnv on
  +
   - The following options can currently only be set from httpd.conf:
        optRawInput, optKeepSpaces
   
  @@ -155,22 +193,9 @@
   Embperl 1.x compatibility flag
   ------------------------------
   
  -If you don't have a separate computer to make the test setup, you can
  -include
  -
  -     PerlSetEnv EMBPERL_EP1COMPAT 1
  -
  -at the top level of your httpd.conf. Then Embperl will behave just the same
  -like Embperl 1.3b7. In the directories where you make your tests, you
  -include
  -
  -     PerlSetEnv EMBPERL_EP1COMPAT 0
  -
  -to enable the new engine.
  -
  -but _DON'T_ use this one on a production machine. While this compatibility mode
  -is tested and shows no problems for me, it's not as well tested as 1.3b7
  -itself!
  +The compatibility flag isn't available anymore in 2.0b6. Since now
  +Embperl 2.0 lives in his own namespace, you can install Embperl 1.x and
  +2.x on the same machine without conflicts.
   
   
   Addtional Config directives
  @@ -235,8 +260,8 @@
       - EmbperlHTML       # all the HTML tags that Embperl recognizes by default
       - EmbperlBlocks     # all the [ ] blocks that Embperl supports
       - Embperl           # (default; contains EmbperlHtml and EmbperlBlocks)
  -    - ASP               # <%  %> and <%=  %>, see perldoc HTML::Embperl::Syntax::ASP
  -    - SSI               # Server Side Includes, see perldoc 
HTML::Embperl::Syntax::SSI
  +    - ASP               # <%  %> and <%=  %>, see perldoc Embperl::Syntax::ASP
  +    - SSI               # Server Side Includes, see perldoc Embperl::Syntax::SSI
       - Perl              # File contains pure Perl (similar to Apache::Registry), but
                           #  can be used inside EmbperlObject
       - Text              # File contains only Text, no actions are taken on the Text
  @@ -249,7 +274,7 @@
   
   You can get a description for each syntax if you type
   
  -    perldoc HTML::Embperl::Syntax::xxx
  +    perldoc Embperl::Syntax::xxx
   
   where 'xxx' is the name of the syntax.
   
  @@ -282,16 +307,277 @@
   Session handling has changed from 1.3.3 to 1.3.4 and 2.0b3 to 2.0b4. You must either
   install Apache::SessionX or set
   
  -    PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS "HTML::Embperl::Session"
  +    PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS "Embperl::Session"
   
   to get the old behaviour.
   
   
  +Overview Embperl objects
  +------------------------
  +
  +
  + * Application object
  +
  +   thread
  +   curr_req
  +   config
  +   lfd
  +   user_session
  +   state_session
  +   app_session
  +   udat
  +   sdat
  +   mdat
  +   debug
  +
  +
  + * Application configuration
  +
  +   app_name
  +   app_handler_class
  +   session_args
  +   session_classes
  +   session_config
  +   session_handler_class
  +   cookie_name
  +   cookie_domain
  +   cookie_path
  +   cookie_expires
  +   log
  +   debug
  +   mailhost
  +   mailhelo
  +   mailfrom
  +   maildebug
  +   mail_errors_to
  +   object_base
  +   object_app
  +   object_addpath
  +   object_stopdir
  +   object_fallback
  +   object_handler_class
  +   new
  +
  +
  + * Request object
  +
  +   apache_req
  +   config
  +   param
  +   component
  +   app
  +   thread
  +   request_count
  +   request_time
  +   iotype
  +   session_mgnt
  +   session_id
  +   session_state_id
  +   session_user_id
  +   exit
  +   log_file_start_pos
  +   error
  +   errors
  +   errdat1
  +   errdat2
  +   lastwarn
  +   cleanup_vars
  +   cleanup_packages
  +   initial_cwd
  +   messages
  +   default_messages
  +   startclock
  +   stsv_count
  +
  +
  + * Request configuration
  +
  +   allow
  +   urimatch
  +   decline
  +   mult_field_sep
  +   path
  +   debug
  +   options
  +   session_mode
  +
  +
  + * Request parameter
  +
  +   filename
  +   unparsed_uri
  +   uri
  +   path_info
  +   query_info
  +   language
  +   cookies
  +
  +
  + * Component object
  +
  +   config
  +   param
  +   req_running
  +   sub_req
  +   inside_sub
  +   exit
  +   path_ndx
  +   cwd
  +   ep1_compat
  +   phase
  +   sourcefile
  +   buf
  +   end_pos
  +   curr_pos
  +   sourceline
  +   sourceline_pos
  +   line_no_curr_pos
  +   document
  +   curr_node
  +   curr_repeat_level
  +   curr_checkpoint
  +   curr_dom_tree
  +   source_dom_tree
  +   syntax
  +   ifd
  +   ifdobj
  +   append_to_main_req
  +   prev
  +   strict
  +   import_stash
  +   exports
  +   curr_package
  +   eval_package
  +   main_sub
  +   prog
  +   prog_run
  +   prog_def
  +   code
  +
  +
  + * Component configuration
  +
  +   package
  +   debug
  +   options
  +   escmode
  +   ep1compat
  +   cache_key
  +   cache_key_options
  +   expires_func
  +   cache_key_func
  +   expires_in
  +   syntax
  +   recipe
  +   xsltstylesheet
  +   xsltproc
  +   compartment
  +   cleanup
  +
  +
  + * Component Parameter
  +
  +   inputfile
  +   outputfile
  +   input
  +   output
  +   sub
  +   import
  +   firstline
  +   mtime
  +   param
  +   fdat
  +   ffld
  +   object
  +   isa
  +   errors
  +   xsltparam 
  +
  +Configuration directives summary
  +--------------------------------
  +
  +
  +/* tComponentConfig */
  +
  +PACKAGE 
  +DEBUG 
  +OPTIONS 
  +ESCMODE 
  +CACKE_KEY 
  +CACHE_KEY_OPTIONS
  +EXPIRES_FUNC 
  +CACHE_KEY_FUNC
  +EXPIRES_IN 
  +SYNTAX 
  +RECIPE 
  +XSLTSTYLESHEET 
  +XSLTPROC 
  +COMPARTMENT
  +
  +
  +/* tReqConfig */
  +
  +ALLOW 
  +URIMATCH 
  +MULTFIELDSEP 
  +PATH
  +DEBUG 
  +OPTIONS 
  +SESSION_MODE 
  +
  +
  +
  +/* tAppConfig */
  +
  +APPNAME 
  +APP_HANDLER_CLASS
  +SESSION_HANDLER_CLASS
  +SESSION_ARGS 
  +SESSION_CLASSES
  +SESSION_CONFIG 
  +COOKIE_NAME 
  +COOKIE_DOMAIN
  +COOKIE_PATH 
  +COOKIE_EXPIRES 
  +LOG 
  +DEBUG 
  +MAILDEBUG 
  +MAILHOST 
  +MAILHELO 
  +MAILFROM 
  +MAIL_ERRORS_TO
  +OBJECT_BASE
  +OBJECT_APP
  +OBJECT_ADDPATH
  +OBJECT_STOPDIR
  +OBJECT_FALLBACK
  +OBJECT_HANDLER_CLASS
  +
  +
  +When running under mod_perl, you can use this directly as Apache configuration
  +directives. They are case insensitiv. You don't need the use environment 
  +variables for configuration anymore. For this to work you have to add a
  +
  +  PerlModule Embperl
  +  AddModule embperl.c
  +  
  +before the first Embperl configuration directive. If you still like to
  +use enviroment variables, you must set
  +
  +  Embperl_UseEnv on
  +
  +For CGI mode still use enviroment variables.
  +
  +
  +
  +
  +
  +
   Recipes
   -------
   
   Starting with 2.0b4 Embperl introduces the concept of recipes. A recipe basically
  -tells Embperl how the request should be processed. While before 2.0b4 you could 
  +tells Embperl how a component should be build. While before 2.0b4 you could 
   have only one processor that works on the request (the Embperl processor -
   you're also able to define different syntaxes), now you can have multiple of them
   arranged in a pipeline or even a tree. While you are able to give the full
  @@ -352,9 +638,10 @@
   
   Another nice thing about recipes is that they are not static. A recipe
   is defined by a recipe object. When a request comes in, Embperl calls
  -the new method of the recipe object, which should return a hash
  -that describes what Embperl has to do. The new method can of course
  -build the hash dynamically, looking, for example, at the request parameters
  +the get_recipe method of teh application object, which by default
  +calls the get_recipe of the named recipe object, which should return a array
  +that describes what Embperl has to do. The get_recipe methods can of course
  +build the array dynamically, looking, for example, at the request parameters
   like filename, formvalues, mime type or whatever. For example if you
   give a scalar as input the Embperl recipe replaces the file provider
   with a memory provider. Additionally you can specify more then one
  @@ -364,7 +651,7 @@
   to check the file extension and only return the recipe if it matches.
   Much more sophisticated things are possible...
   
  -See perldoc HTML::Embperl::Recipe for how to create your own provider.
  +See perldoc Embperl::Recipe for how to create your own provider.
   
   
   XML, XSLT
  @@ -404,6 +691,89 @@
   
   By setting EMBPERL_ESCMODE (or $escmode) to 15 you get the correct escaping
   for XML.
  +
  +
  +Internationalisation (I18N)
  +---------------------------
  +
  +Starting with 2.0b6 Embperl has buildin support for multi-language applications.
  +There are two things to do. First inside your pages marks which parts are 
translateable,
  +by using the [= =]. Inside the [= =] blocks you could either put id, which are 
symbolic
  +names for the text, or you put the text in your primary lanaguage inside the blocks.
  +An example code could look like:
  +
  +[= heading =]
  +
  +<input name="foo" value="[=bar=]" type="submit">
  +
  +Now you run the embpmsgid.pl utility, which extracts all the ids from your page:
  +
  +    perl embpmsgid.pl -l de -l en -d msg.pl foo.htm
  +
  +This will create a file msg.pl which contains empty definitions for 'en' and 'de'
  +with all the ids found in the page. If the file msg.pl already exists, the 
definitions
  +are added. You can give more then one filename to the commandline. The format of 
the 
  +msg.pl file is written with Data::Dumper, so it can be easily read in via 'do' and 
  +postprocessed. As next step fill the empty definition with the correct translation.
  +The last thing to do, is tell Embperl which language set to use. You do this inside
  +the init method of the application object. Create an application object, which reads
  +in the message and when the init method is called, pass the correct one to Embperl.
  +There are tow methods $r -> message and $r -> default_message. Both returns a array
  +ref on which you can push your message hashs. Embperl consults first the message 
array
  +and if not found afterwards the default_message array for the correct message.
  +Because both are arrays you can push multiple message sets on it. This is handy when
  +your application object calls it's base class, which also may define some messages.
  +Here is an example:
  +
  +
  +    package My::App ; 
  +
  +    @ISA = ('Embperl::App') ;
  +
  +    %messages =
  +        (
  +        'de' =>
  +            {
  +            'heading' => '�berschrift',
  +            'bar'     => 'Absenden',
  +            },
  +        'en' =>
  +            {
  +            'heading' => 'Heading',
  +            'bar'     => 'Submit',
  +            },
  +        ) ;
  +
  +    sub init
  +        {
  +        my $self = shift ;
  +        $r = $self -> curr_req ;
  +
  +        $lang = $r -> param -> language || 'de' ;
  +        push @{$r -> messages}, $messages{$lang} ;
  +        push @{$r -> default_messages}, $messages{'en'} if ($lang ne 'en') ;
  +        }
  +
  +    1 ;
  +
  +
  +Just load this package and set EMBPERL_APP_HANDLER_CLASS to My::App, then 
  +Embperl will call the init method on the start of the request.
  +
  +If you are using Embperl::Object, you may instead save it as a file in your
  +document hiearchie make the filename know to Embperl::Object with the 
  +EMBPERL_OBJECT_APP directive and Embperl::Object will retrive the correct
  +application file, just in the same way it retrives other files.
  +
  +NOTE: When using with EMbperl::Object, don't make a package declaration at
  +the top of your application object, Embperl::Object assign it's own namespace
  +to the application object.
  +
  +In case you need to retrive a text inside your Perl code, you can do this
  +with $r -> gettext('bar')
  +
  +
  +
   
   -------------------
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.24  +6 -2      embperl/driver/Attic/epxalan.cpp
  
  Index: epxalan.cpp
  ===================================================================
  RCS file: /home/cvs/embperl/driver/Attic/epxalan.cpp,v
  retrieving revision 1.1.2.23
  retrieving revision 1.1.2.24
  diff -u -r1.1.2.23 -r1.1.2.24
  --- epxalan.cpp       5 Mar 2002 11:30:37 -0000       1.1.2.23
  +++ epxalan.cpp       5 Mar 2002 12:46:02 -0000       1.1.2.24
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epxalan.cpp,v 1.1.2.23 2002/03/05 11:30:37 richter Exp $
  +#   $Id: epxalan.cpp,v 1.1.2.24 2002/03/05 12:46:02 richter Exp $
   #
   
###################################################################################*/
   
  @@ -889,7 +889,11 @@
       if (pParamHV)
           {
           SV * pSV = (SV *)((tProviderXalan *)pProvider) -> pParamHV ;
  -        SvREFCNT_inc (pSV) ;
  +#ifdef SOLARIS
  +        ATOMIC_INC(SvREFCNT((pSV))) ;
  +#else
  +        SvREFCNT_inc((pSV)) ;
  +#endif
           }
   
       return ok ;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.25  +2 -2      embperl/xsbuilder/maps/Attic/ep_structure.map
  
  Index: ep_structure.map
  ===================================================================
  RCS file: /home/cvs/embperl/xsbuilder/maps/Attic/ep_structure.map,v
  retrieving revision 1.1.2.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- ep_structure.map  5 Mar 2002 08:07:23 -0000       1.1.2.24
  +++ ep_structure.map  5 Mar 2002 12:46:02 -0000       1.1.2.25
  @@ -210,8 +210,8 @@
   
    <tReqConfig>
   !   _perlsv
  -   sAllow | allow
  -   sFilesMatch | filesmatch
  +   pAllow | allow
  +   pURIMatch | urimatch
      sDecline | decline
      cMultFieldSep | mult_field_sep
      pPathAV | path
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to