Perl API: missing active check in get?

Ryan T. Dean rtdean-lists-memcache@cytherianage.net
Mon, 6 Oct 2003 06:53:05 -0400


--zGQnqpIoxlsbsOfg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 06, 2003 at 01:38:26AM -0400, Ryan T. Dean wrote:
> I've been pouring over the perl API tonight.  In all of the functions=20
> that actually do anything with the memcache server (get_multi, delete,=20
> _set, _incrdect) except get include a check to make sure the client has=
=20
> active servers to talk to (return undef unless $self->{'active'};).
>=20
> Just a heads up.
>=20
> 		-Ryan T. Dean

Looking farther, in _incrdecr, at the very end...

shouldn't=20

return undef unless $line =3D~ /^(\d)/;

be

return undef unless $line =3D~ /^(\d+)/;

Other places where you expect a multiple-digit number (ie, _load_items=20
in the VALUE regex) you check for (\d+).  If it works, well, then,=20
ignore me... :)

	-Ryan T. Dean


--zGQnqpIoxlsbsOfg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/gUmRW6VZzwycJGURAlfsAKCXv+LOga3cZrcdOUt714cAXx3QQACg2XeE
BV3+Oo5jagbENkHb9XhxgHQ=
=Hjoa
-----END PGP SIGNATURE-----

--zGQnqpIoxlsbsOfg--