• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H07-May-2022-11170

devel/H20-Feb-2015-1,164530

examples/H20-Feb-2015-10024

inc/H20-Feb-2015-12566

lib/constant/H20-Feb-2015-45580

t/H20-Feb-2015-707520

xt/H20-Feb-2015-684355

xtools/H20-Feb-2015-259128

COPYINGH A D29-Jun-200734.2 KiB677553

ChangesH A D14-Feb-20151.1 KiB3724

MANIFESTH A D20-Feb-20151.1 KiB4948

MANIFEST.SKIPH A D15-Nov-20133 KiB15381

META.jsonH A D20-Feb-20151.3 KiB6059

META.ymlH A D20-Feb-2015695 3130

Makefile.PLH A D14-Feb-20151.7 KiB5731

READMEH A D26-Sep-20091.3 KiB3724

SIGNATUREH A D20-Feb-20153.7 KiB7164

README

1Copyright 2009 Kevin Ryde
2
3This file is part of constant-defer.
4
5constant-defer is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License as
7published by the Free Software Foundation; either version 3, or (at
8your option) any later version.
9
10constant-defer is distributed in the hope that it will be
11useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13General Public License for more details.
14
15You should have received a copy of the GNU General Public License along
16with constant-defer.  If not, see <http://www.gnu.org/licenses/>.
17
18
19
20constant::defer makes subroutines similar to the builtin constant.pm,
21but with the value calculation deferred until the sub is actually run.
22
23    use constant::defer FOO => sub { calculate;
24                                     return $something };
25
26This is handy for big or slow things only needed sometimes, or where
27at least the pain can be put off the point needed.
28
29Lazy or deferred calculations can be hidden behind a scalar variable
30too.  The choice between a sub and a variable is a matter of style or
31personal preference.  Both ways have advantages, see the
32constant::defer POD for some notes.
33
34The constant-defer home page is
35
36    http://user42.tuxfamily.org/constant-defer/index.html
37