[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

useful snippets

It would be nice if wml::std had something like this in it:

(note: I haven't quite got the mp4h quoting down pat yet)
	sub params { 	my @foo = split /\s+/, scalar shift ; 
	 	 	return @foo;  } 
	sub truss   { 	my @params = params(shift);
			foreach (@params) {
		 		$$1 = $2 	if /(\w+)=(\w+)/ ||

because then you could

<define-tag foo whitespace=delete>
		local $foo, $bar;
		print "$foo:$bar";

<foo foo=la bar=toodles>

and get 'la:toodles'.

Basically, I think that there needs to be some quick, default way
of importing %attributes into perl expressions.

Democracy is the theory that the common people know what they want and deserve 
to get it good and hard.      --Henry Louis Mencke
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com