[Setup-tool-hackers] backends



Hello,

I have a proposal to clean up backends :) What is wrong with them as I
see it:

1. Dependencies. Like a.pl requires b.pl and b.pl requires a.pl. I think
they should all be in dependency tree.
2. There should be perl modules, not just perl programs acting like
modules. Perl modules are improvements of old style perl files (the way
we currently have them) which was introduced in perl 5. There are many
reasons why modules should be used (like, you don't have to call init
function to init library, they act much like objects). With modules we
hide as much internal functionality as we want and don't have to prefix
all functions with xst_libraryname_*. Calling functions from your
program requires it anyway, so we call XST::LIBRARYNAME::*

3. use strict;
This helps debugging A LOT. Everybody complains that perl's syntax is
too loose. perl provides a way to make it more strict, so let's use it!
Try to add use strict to any "module" and see how many complains it has
:)
4. Maybe, just maybe, add function prototypes. I'm not sure if I'm using
the right terminology, but here's an example what I mean:
sub do_something ($@)
Meaning that function do_something takes two arguments, a scalar ($) and
a list (@). In my mind it makes code more readable (again, makes perl
more strict, let's use it!).
5. Install backends to the same place where perl libraries live. At
least backend modules. What happens if I have installed XST and kde
sysconfig stuff (in the future)? Maybe some frontend looks better in one
of them than others and I want to use both packages at the same time. I
think we are targeting to make a standard for configuring *nix systems,
let's add it to standard place... The beginning is already made and
backends are separated from frontends :)

Ideas?

Tambet


_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@ximian.com
http://lists.ximian.com/mailman/listinfo/setup-tool-hackers



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