perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject Re: Testing 2.x with production 1.x code
Date Fri, 27 Jun 2003 22:01:00 GMT
Hi Neil,

as long as you don't use any of the new features of Embperl 2, you should be
able to create code that works under 1.3 and 2.0 (I have done this in the
past, now I only using 2.0).

For the $req_rec issue: $req_rec are the same in 2.0 as in 1.3, there is no
difference. There is a test in make test that verifies this and it still
works in 2.0b9.

So I think there is really nothing that needs to be added to Embperl to
change your existing code base and run it under 1.3 and 2.0 at the same
time.

BTW. Because 1.3 and 2.0 uses different namespaces you can even run it at
the same time at different locations at the same server without problems

Gerald

--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

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
|
+-------------------------------------------------------------

----- Original Message -----
From: "Neil Gunton" <neil@nilspace.com>
To: "embperl" <embperl@perl.apache.org>
Sent: Wednesday, June 25, 2003 7:55 PM
Subject: Re: Testing 2.x with production 1.x code


> Here's an idea: There seem to be two kinds of changes that have to be
> made to existing 1.x code in order to transition to 2.x. The first kind
> are changes which would still work under 1.x (for example putting
> brackets around the expression in [$ foreach $], or making [+ do { } +]
> for expressions which had more than one statement). Obviously those are
> changes that I am ok with making, because although they are necessary
> for 2.x, they won't break my site under 1.x. The other kind of change is
> the more worrying one - where I have to change the code in a way that
> breaks 1.x, e.g. the way I reference certain objects or methods. To take
> just one example, in my current site I call $req_rec->update_mtime() to
> set the modification time for the page, whereas in 2.x you have to have
> something like $req->apache_req->update_mtime(). This is different
> enough that it's worrying to go through all your code changing it,
> knowing that you'll just have to roll back if 2.x breaks for some
> reason.
>
> So here's the question for Gerald: How hard would it be to include
> "compatibility" objects and methods so that code will work under both
> 1.x and 2.x? So I could count on, for example, $req_rec being there in
> either version? I have no idea how many other little instances of this
> there would be, but it's just an idea. It would certainly make testing
> 2.x much easier for people like me who already have large "production"
> installations of Embperl and need to test 2.x. without converting all
> their code immediately. I think anyone like me would be a little
> cautious about changing all their code to test 2.x, and then having to
> either change it all back again to go back to 1.x, or else develop some
> kind of complex merge that would quickly get out of date as new
> development is done.
>
> Just an idea, let me know if it's totally impractical...
>
> Thanks again
>
> -Neil
>
> Neil Gunton wrote:
> >
> > Hi, I am finally having the time to get into trying out the 2.0b9 to see
> > if I can transition my existing websites. However I am having a problem
> > with the fact that there are so many little things that are different
> > between 1.x and 2.x (different objects to call, for example the $req_rec
> > object apparently doesn't work any more). If I change my code to work
> > with 2.x then it won't work with 1.x any longer - but I don't want to
> > commit all my code to 2.x until I am sure it works, and I don't want to
> > have to maintain two versions of my code (there is a lot of it on the
> > crazyguyonabike website, some 393 files at present, some quite large).
> > During the time I am testing 2.0b9 I will still have to be making
> > updates and fixes to my production sites, I can't freeze development
> > until 2.0 is ready - it is uncertain when 2.0 will be stable enough for
> > production use. I realize that it will only get there if we all test it
> > out under real conditions, which I want to do. So any advice on how to
> > fully test out 2.0b9 on existing production code without having to
> > commit to 2.x prematurely, or else maintain two separate versions of my
> > code? Sorry if this is a dumb question.
> >
> > Thanks,
> >
> > -Neil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message