Re: [Templates] possible bug?
[prev]
[thread]
[next]
[Date index for 2004/06/23]
--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* David Hodgkinson <daveh at rockitfactory.com> [2004/06/23 21:02]:
> I have a code fragment:
>=20
> <% FOREACH i =3D item.keys.nsort -%>
> <% IF i !=3D "subsections" -%>
>=20
> where the key is a numeric sort order.
>=20
> This throws a:
>=20
> Argument "subsections" isn't numeric in numeric comparison (<=3D>) at=20
> /usr/lib/perl5/site_perl/5.6.1/Template/Stash.pm line 212.
nsort is the *numeric* version of the sort. Are you sure you don't want
to try the sort vmethod, which does cmp?
(darren)
--=20
Maybe this world is another planet's hell.
-- Aldous Huxley
--GvXjxJ+pjyke8COw
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA2eVVzsinjrVhZaoRAtAuAJ9aBk4DJuWK8+ecEhgBKDETOFH1mwCgjM93
CPLUHWbQPDw4ijUfARiN5T0=
=I6MT
-----END PGP SIGNATURE-----
--GvXjxJ+pjyke8COw--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] possible bug?
darren chamberlain 20:17 on 23 Jun 2004
|