< Erlyweb mailing list ~ bug: annoying double slash in function a/? if AppRoot is mis
|Posted: Tue Jul 29, 2008 3:46 pm
I didn't define an AppRoot for my blog application (I'm on 0.7.2) , so
I get a double / -> // for magic components for these statements in
It concerns these statements (grepped):
erlyweb_view.et:14:<% a([AppRoot, Model, <<"new">>], <<"create new">>)
erlyweb_view.et:23:<% a([AppRoot, Model, <<"delete">>, Id],
My yaws.conf looks like this:
< server localhost >
port = 8000
listen = 127.0.0.1
docroot = /home/luser/projects/blog/www
appmods = <"/", erlyweb> ## !!
< /server >
I tried hacking the join/1+2 function to not accept an element in the
Args list parameter if a "" =:=  is present, like this:
%% A helper function
join(, _) -> ;
join([Last], Acc) ->
lists:reverse([Last | Acc]);
join([First | Rest], Acc) when First =:=  -> %% !!
join([First | Rest], Acc) when First =/=  -> %% orig.
join(Rest, [[First, $/] | Acc]).
But it's not working as I expect. It should filter out null values.
I think a nice filter for  =:= "" might work for a/2 in module
What do you guys think? The cost is only O(1) since the double slashed
part of "//component/function/par" makes firefox think the target is
I haven't tested on other browsers except opera and firefox (covers
all of mozilla methinks). Both fail.
I'll try to fix this using a filter on the a/2 definiton in
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to email@example.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
Post received from mailinglist
|Back to top
All times are GMT
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum