Khemir Nadim wrote:
Hi Ruslan


My ideas:
1) May be it's better to prefix with _ all funcs which have AUTOLOAD
magic? There is many such methods in module so it's hard to inherit this
object.


Thats just one idea, where are the others? I agree with David, It's
difficult to give any opinion if we don't have access to your module and/or
documentation.

About the '_' prefix, it's a bad idea, as bad as hungarian notation ;-)

- it's even worse than having to remember where the caps are in a function
name
- keep '_' for real private functions you don't want people to use (this is
a consensus not a law)
Hello, Nadim and other.

If you look at code then you'll see that there is several subs that have argument 'List'(scalar, name of list) almost all of them haven't other args. It's next functions:
qw(Count First Current Last Next Prev Push Pop Unshift Shift);


So I'v wrote AUTOLOAD sub which dinamicaly create aliases, for eg.

$ML->InitList('Attr');
$ML->FirstAttr; # it's same as
$ML->First( List => 'Attr' );

As you can see this short names are very simple and short, there is much chanses in real world that user want to use this names for own subs. Becouse of there is also aliases which is more prefered way to do things I can move short sub names to private with _ prefix.


- what happends when you decide that a function should not be autoloaded
anymore? Do you keep the underscore and go against your own idea or do all
the users change their source code?

I don't understand what the autoloading mechanism has to do with
inheritance! (Something for me to learn I guess)

A last word, Write a good, complete, usable documentation. It takes time,
very long boring time but it's worth it.
It's very big problem for me, but I'll try surely.

Now the really last word, don't expect people to give you feedback or even show they care (they do in their own way:-)
I do it in my own way too :), but I don't like current state of CPAN. It's really hard to find module that satisfy needs.
I really don't see any needs in some modules which are deprecated, not maintained for long time, not used by anybody except authors.
Last time I do next:
search.cpan.org for modules with name space 'Mail::' or with distro name that contain 'Mail'. Then review all list for good names and do own marks in local text file about good and useful ones.


Good luck. Ruslan.

And to prove that I am not a decided guy, my final word, Good luck and welcome to the module author cast (I let the other decide at what height it lays)

Cheers, Nadim.






Reply via email to