You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2005/03/15 06:10:20 UTC

ANNOUNCE: Embperl 2.0rc3

The URL

    ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-2.0rc3.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Embperl-2.0rc3.tar.gz
  size: 653154 bytes
   md5: b87ceabfb9c2bc46b9ffe3fdeba6046b

Since there were a lot of small changes since 2.0rc2 I decided to release
another rc version before the final 2.0 release. If no additional bugs are
found this will turn into Embperl 2.0.0 

Any bug reports, patches, documentation updates, spelling corrections are
welcome. So give it a try...


Embperl is a system for building dynamic websites with Perl.

It gives you the power to embed Perl code in your HTML/XML documents and the
ability to build your Web site out of small reusable objects in an
object-oriented style. 

Embperl has several features which are especially useful for creating
Websites, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, caching, xslt transformation and
more.

See http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more information.

Enjoy

Gerald


Changes since 2.0rc2:

   - Handle warnings the same way under Embperl and Embperl::Object, so they
     are in both cases log to embperl.log and the Apache error log and show
     up on the error page. Reported by Dirk Melchers.
   - Report line number and file name in unstructures jump error messages.
     Requested by Michael Smith.
   - Fixed sigsegv under solaris cause by NULL point in debug output.
   - Applied patches from Angus Lees to make Embperl compile and test on
     64Bit machines and avoid some compiler warnings.
   - Add pod for embpmsgid.pl from Angus Lees.
   - Fix [= =] with included spaces in embpmsgid.pl. Reported by Robert.
   - Make undef values for translation hashs treat as the same as
     non exists. Requested by Robert.
   - Let embpmsgid.pl parse out language tags of gettext, sort output
     and don't convert chars > 128 to octal values. Requested by Robert. 
   - Fixed make test module load problem for mod_perl tests, when
     mod_perl is staticly linked into Apache
   - Documentation updates and cleanup 
   - Output an error message when an Embperl sub is called and no
     Embperl request is active.
   - Do not use method call to output in send_error_page to avoid
     trouble with overloaded output function.
   - Fixed segfault which occured sometimes randomly after compile 
     of Embperl page source.
   - Reimplemented SetupSession, CleanupSession and SetSessionCookie
     which can be used to access Embperl session data from outside,
     for example from mod_perl Authentication handler.
   - Fixed problem with undefined $req_rec when Embperl::Execute
     is called from a registry script. Reported by Martin Moss.     
   - If an object is passed to die inside Execute the errors array
     will receive this object and will not be stringified.
     Requested by Robert Noris.
   - $epreq -> errobj holds the last object passed to die during 
     the request.
   - Added documentaion of Embperl's error handling and trapping. 
   - If optReturnError is set in the httpd.conf it is now reseted
     for all sub components, to make sure all errors are reported
     back. (It can still be set via the options argument of 
     Execute).
   - Using ErrorDocument by setting optReturnError now also works
     under EmbperlObject. Reported by Robert Noris.
   - Fixed problem when calling Embperl sub via Execute inside a
     file that is called via Execute. Reported by Michael Smith.
   - Fixed segfault when requesting symbol tables informations
     via Apache::Status, reported by Dan Wilga.
   - Find apr.h if it is not in same directory as httpd.h in
     Makefile.PL. (Necessary for RedHat)

---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
CeBIT 2005: Sie finden uns in Halle 7 Stand C22/8 (CEFIS-Area)
---------------------------------------------------------------------------

 


Re: Can't return outside a subroutine, line 138.

Posted by jet <je...@emagery.com>.
Actually, we solved the issue soon after this post (which took quite a while 
to make it to the list) ... anyhow, we developed a compiled language 
interface to our databases that does simple queries and in some cases data 
comparison, and returns the results to the aforementioned perl object 
creating base module for higher level per-database modules that give each an 
object identity.

Well, that regex on line 905 was inappropriatelly culling out an AND given 
to the SQL maker in question, and handing it off to the database service... 
the service (which is relatively young so far and not particularly emotive 
when it fails) was somehow interrupting or bullying the error_log buffer 
such that the few lines of warns that came between the regex and the return 
$sql line never saw the light of day, making the whole ordeal appear as if 
the subroutine simply stopped on the same line as the regex.  And we 
couldn't for the life of us figure out why the subroutine would abort 
several lines premature of the return statement... and it wasn't.

So let our embarrassment serve the greater good; don't always believe what 
the error_log tells you!!! We did and ended up chasing a wild goose.

----- Original Message ----- 
From: "Stas Bekman" <st...@stason.org>
To: "Tom Schindl" <to...@gmx.at>
Cc: "jet" <je...@emagery.com>; <mo...@perl.apache.org>
Sent: Wednesday, March 16, 2005 9:01 PM
Subject: Re: Can't return outside a subroutine, <SOCKET> line 138.


> Tom Schindl wrote:
>> jet wrote:
>>
>>> i'm losing my mind here;
>>>
>>> to protect the client, i am 're-naming' the module names for 
>>> confidentiality, but I have a seriously weird problem that is not adding 
>>> up to anything intuitive for me at all.
>>>
>>> We have a foundation module that deals with interacting with our 
>>> databases... higher level modules then base themselves off this 
>>> foundation,. which provides functionalities such 
>>> as ->select, ->new, ->save, ->update, ->find ...
>>>
>>> well, we've recently upgraded servers and moved towards apache2/modperl2
>>>
>>> more precisely:
>>>
>>> httpd-2.0.52-9.ent
>>> mod_perl-1.99_16-4
>>
>>
>>
>> I'd say that you should upgrade mod_perl to the latest and greatest and 
>> look if the problem goes away.
>
> If the problem persists after the upgrade, please try to minimise the 
> module to a very minimum so we can see the whole picture. Is it an anon 
> sub by chance?
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005
>
> 


Re: Can't return outside a subroutine, line 138.

Posted by Stas Bekman <st...@stason.org>.
Tom Schindl wrote:
> jet wrote:
> 
>> i'm losing my mind here;
>>
>> to protect the client, i am 're-naming' the module names for 
>> confidentiality, but I have a seriously weird problem that is not 
>> adding up to anything intuitive for me at all.
>>
>> We have a foundation module that deals with interacting with our 
>> databases... higher level modules then base themselves off this 
>> foundation,. which provides functionalities such as ->select, ->new, 
>> ->save, ->update, ->find ...
>>
>> well, we've recently upgraded servers and moved towards apache2/modperl2
>>
>> more precisely:
>>
>> httpd-2.0.52-9.ent
>> mod_perl-1.99_16-4
> 
> 
> 
> I'd say that you should upgrade mod_perl to the latest and greatest and 
> look if the problem goes away.

If the problem persists after the upgrade, please try to minimise the 
module to a very minimum so we can see the whole picture. Is it an anon 
sub by chance?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: Can't return outside a subroutine, line 138.

Posted by Tom Schindl <to...@gmx.at>.
jet wrote:

> i'm losing my mind here;
>
> to protect the client, i am 're-naming' the module names for 
> confidentiality, but I have a seriously weird problem that is not 
> adding up to anything intuitive for me at all.
>
> We have a foundation module that deals with interacting with our 
> databases... higher level modules then base themselves off this 
> foundation,. which provides functionalities such as ->select, ->new, 
> ->save, ->update, ->find ...
>
> well, we've recently upgraded servers and moved towards apache2/modperl2
>
> more precisely:
>
> httpd-2.0.52-9.ent
> mod_perl-1.99_16-4


I'd say that you should upgrade mod_perl to the latest and greatest and 
look if the problem goes away.


Can't return outside a subroutine, line 138.

Posted by jet <je...@emagery.com>.
i'm losing my mind here;

to protect the client, i am 're-naming' the module names for 
confidentiality, but I have a seriously weird problem that is not adding up 
to anything intuitive for me at all.

We have a foundation module that deals with interacting with our 
databases... higher level modules then base themselves off this foundation,. 
which provides functionalities such 
as ->select, ->new, ->save, ->update, ->find ...

well, we've recently upgraded servers and moved towards apache2/modperl2

more precisely:

httpd-2.0.52-9.ent
mod_perl-1.99_16-4
perl-5.8.5-12.1

anyhow, forgive the mess, but here is a clip from the offending subroutine:

---------------
    $sql .= " ($args{FIELD} NOT IN $args{NOTIN}) " if $args{NOTIN};

     warn " <- line 903: $sql\n";

        $sql =~ s/\sAND$//; warn " <- line 905: $sql\n";
        $sql .= " GROUP BY $args{GROUPBY}" if $args{GROUPBY}; warn " <- line 
906: $sql\n";
        $sql .= " HAVING $args{HAVING}" if $args{HAVING}; warn " <- line 
907: $sql\n";
        $sql .= " ORDER BY $args{ORDERBY}" if $args{ORDERBY}; warn " <- line 
908: $sql\n";

 warn " <- line 910: $sql\n";
    $sql .= ' LIMIT 1' unless $wantarray;

    warn "ModuleName::build_sql -> \$sql = $sql\n";

    return $sql;
}

-----------------

in our error log we get:

------------------

 <- line 895: SELECT ID FROM ultsys.rules WHERE ( hasvalue IN (392)
       AND field LIKE 'quotaleft'
       AND actionID = 1636
       AND criteria > 0) AND
 <- line 899: SELECT ID FROM ultsys.rules WHERE ( hasvalue IN (392)
       AND field LIKE 'quotaleft'
       AND actionID = 1636
       AND criteria > 0) AND
 <- line 903: SELECT ID FROM ultsys.rules WHERE ( hasvalue IN (392)
       AND field LIKE 'quotaleft'
       AND actionID = 1636
       AND criteria > 0) AND
SomeModule::Loader init!
SomeModule::Loader init!
SomeModule::Loader init!
SomeModule::Loader init!
SomeModule::Loader init!
Can't return outside a subroutine, <SOCKET> line 138.
Callback called exit, <SOCKET> line 138.

--------------------

now, i put the init warns in from of EVERY subroutine in the offending 
module...
you'll see the warns from previous lines, right up to 903... 904 is a blank, 
then 905 is a simple regex to slice off a trailing AND from the SQL 
statement we're trying to build... but the running never gets to the warn 
statement following the regular expression substitute... it never gets to 
the warns following line 905... but then we see a bunch of inits from an 
distantly related module not directly connected to this one (there is no 
call to it and no return this early), and them BANG, Callback called exit, 
etc... the page loads, but without the item from the db we tried to select 
and turn into an object.  Other areas of the site successfully use this same 
routine without this problem...

it makes no sense...

ideas are welcome.

~jet