[sr-dev] erlang module pvs

Seudin Kasumovic seudin.kasumovic at gmail.com
Mon May 25 15:43:25 CEST 2015


> On May 25, 2015, at 12:38 PM, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> 
> Hello,
> 
> On 25/05/15 11:55, Seudin Kasumovic wrote:
>> Hi Daniel,
>> 
>>> On May 25, 2015, at 9:43 AM, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
>>> 
>>> Hello,
>>> 
>>> I noticed that erlang module is exporting couple of config variable
>>> classes (pseudo-variables) with various names. I would suggest to prefix
>>> them with 'erl' or something similar to know they are related and
>>> specific to erlang module. Many modules do so already (e.g., tm uses
>>> $T...). You used some generic names that could be confusing at some
>>> point with other components (e.g., 'tuple' is also used a lot in
>>> presence, 'pid' is something common any process and kamailio has also
>>> some variable related to it).
>>> 
>> Prefix ‘erl_’ is used for functions in Erlang module, so prefixing PVs too will be confusing between functions and PVs.
>> I will consider other prefixes ‘$e_’ or ’$E_’ for vars.
> 
> The PVs always start with $ that should avoid confusing. Dialog module
> is using ‘dlg' prefix for both functions and variables.
> 
> For me it is ok if you prefer something else, I just want to have a
> prefix to suggest is not core attribute like 'pid' or something else and
> to be related to the module name by initial or abbreviation.

When I better consider, you suggestion about naming convention is OK. I have done as you suggested first, and added prefix ‘erl’. 

> 
>> 
>>> Another note: documenting PVs in README is ok, but then need to be also
>>> documented in the wiki cookbook:
>>> 
>>> - http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables <http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables>
>>> 
>> How to patch cookbook?
> 
> It is a wiki, you need to make an account and edit the page:
> 
>  - https://www.kamailio.org/wiki/start?do=register <https://www.kamailio.org/wiki/start?do=register>
> 
> Long time ago it was decided to keep vars in wiki so non-developers can
> contribute with more text and examples, also to have all vars in a
> single place. We used SVN at that moment, now with github is easier to
> make pull requests to contribute from anywhere to anywhere. But perhaps
> is still more flexible with wiki, being easier to edit overall.

ASAP will update wiki page.

> 
> Cheers,
> Daniel
> 
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda <http://twitter.com/#!/miconda> - http://www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Kamailio World Conference, May 27-29, 2015
> Berlin, Germany - http://www.kamailioworld.com <http://www.kamailioworld.com/>

Regards,
Seudin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150525/7110c865/attachment-0001.html>


More information about the sr-dev mailing list