I said token, but I meant function. No Devel::Declare here. On Jan 13, 2012 6:00 PM, "David Mertens" <[email protected]> wrote:
> Yeah, this should work, I think, though I would prefer the token last, > latest, or recent. We would obviously have to be careful about exporting > such a basic token. We would do something like > > use PDL::Latest; > $a->mv(0,-1)->rotate(3)->where(latest > 3); > no PDL::Latest; > > The method would return the last piddle modified, which itself could be > stored in the package global $PDL::last_modified_piddle. This gives > function authors control over the "latest" behavior of their functions. It > would also require that all current PDL functions would need to be > retrofitted with this behavior. > > This short example seems like overkill, but in larger cases, or cases in > which the user doesn't have conflicts, it would be nice. > > David > On Jan 13, 2012 5:35 PM, "Chris Marshall" <[email protected]> wrote: > >> A source filter would be the simplest. Maybe another >> clever way could be found, perhaps have the self() set >> from the pdl output of the previous PDL method call or >> routine. >> >> --Chris >> >> On Fri, Jan 13, 2012 at 2:57 PM, Joel Berger <[email protected]> >> wrote: >> >> $a->mv(0,-1)->rotate(3)->where(self>3) >> > >> > How on earth would you do that? Perhaps with a source filter, but >> > unless you were going to make singleton objects I can't think of how >> > one would implement that. >> > >> > Joel >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
