Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
I think that would be a really helpful idea.
I have just discovered that the [] method of CGI has changed:
before: mycgi[‘foo’] => array of items, like mycgi.params[‘foo’]
now: mycgi[‘foo’] => single item, mycgi.params[‘foo’][0]
There is a warning given, and I guess this is an improvement since I write
cgi[‘foo’][0] all over the place at the moment, but it would be nice to have
a list of things to look out for.
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
I think that would be a really helpful idea.
I have just discovered that the method of CGI has changed:
before: mycgi[‘foo’] => array of items, like mycgi.params[‘foo’]
now: mycgi[‘foo’] => single item, mycgi.params[‘foo’][0]
There is a warning given, and I guess this is an improvement since I write
cgi[‘foo’][0] all over the place at the moment, but it would be nice to have
a list of things to look out for.
Regards,
Brian.
Isn’t there a page in the Wiki to document such changes (or was that the
v2 of the pickAxe book page). Can’t tell for sure, the Garden is not
reachable
V.-
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
I think that would be a really helpful idea.
I’m working on that for the built-in stuff: I’ve got 142 changes so far
to built-in classes and modules. I’m still thinking about how to express
this best: right now it’s done as a flag in the source for the PickAxe.
I also made this discovery, when I upgraded mod_ruby to 1.8 and thereby
broke my entire website. Parts of which stayed down for two weeks
because I’d missed them in my fix pass. :\
I admit that having cgi[‘param’] return one value is more convenient
for most scripts, but it would have been nice to announce that change
somewhere. Was there a post on this group about it that I missed?
It’s a major compatibility breaker.
-Mark
···
On Sun, Jul 27, 2003 at 07:26:18PM +0900, Brian Candler wrote:
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
I think that would be a really helpful idea.
I have just discovered that the method of CGI has changed:
Isn’t there a page in the Wiki to document such changes (or was that the
v2 of the pickAxe book page). Can’t tell for sure, the Garden is not
reachable
Too quicke of the mark - not unreachable, just very slow.
Sounds very useful. Might be worth flagging changes as ‘additional
features’, ‘(potentially incompatible) changes’ etc
Cheers,
Brian.
···
On Mon, Jul 28, 2003 at 12:25:39AM +0900, Dave Thomas wrote:
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If
not,
I think that would be a really helpful idea.
I’m working on that for the built-in stuff: I’ve got 142 changes so far
to built-in classes and modules. I’m still thinking about how to express
this best: right now it’s done as a flag in the source for the PickAxe.
Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not,
I think that would be a really helpful idea.
I have just discovered that the method of CGI has changed:
I also made this discovery, when I upgraded mod_ruby to 1.8 and thereby
broke my entire website. Parts of which stayed down for two weeks
because I’d missed them in my fix pass. :\
Maybe things have changed since you did that, because it’s pretty clever
about it now: cgi[‘param’] returns an object which is a subclass of String,
and it has , first and last methods. If you call any of those methods it
just returns the object itself and generates a warning.
Of course, if you need to accept multiple values for a particular form
attribute then it will break; but existing scripts which say cgi[‘param’][0]
do actually work.
I admit that having cgi[‘param’] return one value is more convenient
for most scripts, but it would have been nice to announce that change
somewhere. Was there a post on this group about it that I missed?
It’s a major compatibility breaker.
I didn’t see anything posted either.
Regards,
Brian.
···
On Wed, Jul 30, 2003 at 11:07:03AM +0900, Mark J. Reed wrote:
On Sun, Jul 27, 2003 at 07:26:18PM +0900, Brian Candler wrote:
On Sun, 27 Jul 2003 20:42:13 +0900, Damphyr wrote:
Damphyr wrote:
Isn’t there a page in the Wiki to document such changes (or was that the
v2 of the pickAxe book page). Can’t tell for sure, the Garden is not
reachable
Too quicke of the mark - not unreachable, just very slow.
I admit that having cgi['param'] return one value is more convenient
for most scripts, but it would have been nice to announce that change
somewhere. Was there a post on this group about it that I missed?
It's a major compatibility breaker.
Having said that, I still don’t see how string.empty? is related. It is
valid to have “mycgi?foo=&bar=” (empty strings) and it is valid to have foo
and bar not present (nil), and they are different conditions.
Those conditions would be reported as, respectively,
cgi.params[‘foo’] => [‘’]
cgi.params[‘foo’] =>
And under the new API I believe you should get
cgi[‘foo’] => ‘’
cgi[‘foo’] => nil
so they are still not the same thing.
Regards,
Brian.
···
On Wed, Jul 30, 2003 at 07:10:08PM +0900, ts wrote:
I admit that having cgi[‘param’] return one value is more convenient
for most scripts, but it would have been nice to announce that change
somewhere. Was there a post on this group about it that I missed?
It’s a major compatibility breaker.