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

Bug#37999: PROPOSED]: A pre-install required space checking mechanism for Debian packages



Hi,
>>"Karl" == Karl M Hegbloom <psu25682@odin.cc.pdx.edu> writes:

 Karl>  Why must you call `print_du' like that...  Let's see.  The "('Size
 Karl>  Data' => $data)" constructs a reference to a hash with one key, "Size 
 Karl>  Data".  Why can't you just do something more like:

 Karl>  my $data = &check_du();
 Karl>  &print_du($data);

 Karl>  ... then in &print_du, assign `my %params' as `my $data = $_[1]'?

       I find the former to be easier to understand. Also, it allows
 one to have position independence in calling parameters -- I don't
 have to remember to put in all the parameters in the same order
 wherever I call the function. Also, I do not have to send in 0 or
 NULL parameters -- I only set the non-zero parameters at each
 invocation. I also like the fact that I can add parameters to the
 function and not to have to change all invocations. Also, I sometimes
 add new parameters while writing the caller; I like the fact that I
 can still test and the new parameters are ignored (this last is
 merely personal preference, I code in a mixture of top down and
 bottom up methodologies, and sometimes parameters/functionality
 changes on the fly).

        Hmm. You note that I can (and do) check required
 parameters. You may wish to look at pkg-order, one of the more
 complex Perl programs I have written.

        manoj
-- 
 If you are smart enough to know that you're not smart enough to be an
 Engineer, then you're in Business.
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: