List Info

Thread: Re: Tony, have you considered just using 'dl' to access the P4API ?




Re: Tony, have you considered just using 'dl' to access the P4API ?
country flaguser name
United Kingdom
2007-08-23 03:50:49
> No, to be honest I haven't - probably because I wasn't
aware 
> of it. I don't think it's very practical though as the

> Perforce API is C++ based, and DL really only looks any
good 
> for C.  I need some C++ space in order to call the
methods to 
> convert StrDict objects into Ruby hashes (for
example).
> 
> One alternative I've considered (and I haven't entirely
given 
> up on it yet), is writing P4Ruby as a wrapper around
'p4 -R'. 
> i.e. Use 'p4' to interact with Perforce, and parse its

> output. It'll be slower, significantly so I suspect,
but portable.

>From tests with P4Python, issuing lots of commands (e.g.
as part of P4DTI
type activity) I found API was up to 3-4 times as fast (for
simple commands
where server doesn't have to do much work).

The other key thing is error handling - rather harder to
handle this cleanly
while parsing command line.

Robert
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )