| 1 |
Revision history for Perl extension Class::Container: |
| 2 |
|
| 3 |
0.13 Thu Nov 2 23:53:03 CDT 2017 |
| 4 |
|
| 5 |
- Fix tests failing on Perl 5.26 w/o '.' in @INC [Kent Fredric] |
| 6 |
|
| 7 |
- A bit of Perl::Critic compliance |
| 8 |
|
| 9 |
- Convert to Dist::Zilla |
| 10 |
|
| 11 |
- Convert to git |
| 12 |
|
| 13 |
|
| 14 |
0.12 Sun Jan 23 21:02:35 CST 2005 |
| 15 |
|
| 16 |
- Fixed a bug in the container() method, which was only returning |
| 17 |
valid results for delayed objects, not auto-created ones. [Spotted |
| 18 |
by Sebastian Willert] |
| 19 |
|
| 20 |
0.11 Wed Mar 3 21:34:51 CST 2004 |
| 21 |
|
| 22 |
- Fixed a bug in the code that detects whether Scalar::Util is |
| 23 |
loadable. [Spotted by Michael Alan Dorman] |
| 24 |
|
| 25 |
0.10 Thu Mar 6 16:06:47 CST 2003 |
| 26 |
|
| 27 |
- The dump_parameters() method will now output the default values (if |
| 28 |
any) of parameters that haven't been explicitly set. |
| 29 |
|
| 30 |
0.09 Mon Feb 10 13:12:40 CST 2003 |
| 31 |
|
| 32 |
- Use Carp::croak() instead of die() in most places when throwing a |
| 33 |
fatal error. |
| 34 |
|
| 35 |
- Fixed a problem in dump_parameters() in which attributes from |
| 36 |
superclasses weren't getting dumped. |
| 37 |
|
| 38 |
- The valid_params() method now always returns a hashref, possibly |
| 39 |
empty (when initialization hasn't happened yet), instead of |
| 40 |
sometimes returning undef. |
| 41 |
|
| 42 |
- Added experimental support for "decorator" classes, via the |
| 43 |
decorates() method. |
| 44 |
|
| 45 |
- Fixed the credits in the AUTHOR section to better reflect reality. |
| 46 |
|
| 47 |
- Added a Module::Build-style Build.PL script for installation. |
| 48 |
|
| 49 |
0.08 Thu Aug 29 17:11:20 EST 2002 |
| 50 |
|
| 51 |
- Added the dump_parameters() method, which returns a hash reference |
| 52 |
containing a set of parameters that should be sufficient to |
| 53 |
re-create the given object using its class's C<new()> method (under |
| 54 |
normal/simple circumstances). |
| 55 |
|
| 56 |
0.07 Tue Jul 23 00:34:34 PDT 2002 |
| 57 |
|
| 58 |
- Fix a bug in passing contained objects rather than using the |
| 59 |
defaultly created one. [found by Ilya Martynov <[email protected]>] |
| 60 |
|
| 61 |
- Calling container() when Scalar::Util is not installed now triggers |
| 62 |
a fatal error instead of returning undef |
| 63 |
|
| 64 |
- Get rid off the %ALLOWED_CACHE memoization, since it wasn't working |
| 65 |
properly. It could be done, but not as easily, so maybe it's a |
| 66 |
future project. [consistent prodding by Dave Rolsky] |
| 67 |
|
| 68 |
- Replace guts of get_contained_object_spec() and validation_spec() |
| 69 |
with an _iterate_ISA() internal method. This fixes a bug in |
| 70 |
validation_spec() in which subclasses weren't overriding superclass |
| 71 |
validation_spec()s. |
| 72 |
|
| 73 |
- Make valid_params() a standard get/set accessor method. |
| 74 |
|
| 75 |
- Document that valid_params() should only be called as a class |
| 76 |
method, not object method. |
| 77 |
|
| 78 |
- Improve the output of the show_containers() method. |
| 79 |
|
| 80 |
- Calling contained_objects() twice on the same package wasn't |
| 81 |
properly clearing previous entries. |
| 82 |
|
| 83 |
0.06 Wed Jul 17 17:06:10 EST 2002 |
| 84 |
|
| 85 |
- Memoize the get_contained_object_spec(), validation_spec(), and |
| 86 |
allowed_params() methods. This can give a big speed boost when |
| 87 |
methods are called repeatedly, for example when using factory |
| 88 |
methods. All memoization caches are cleared when valid_params() or |
| 89 |
contained_objects() is called. The only known pitfall in the |
| 90 |
caching is that a class that dynamically changes its @ISA will |
| 91 |
probably mess things up. Idea by Dave Rolsky. |
| 92 |
|
| 93 |
- Use 'scalar validate_with()' inside new(), which may be faster. |
| 94 |
Idea by Dave Rolsky. |
| 95 |
|
| 96 |
- short-circuit create_contained_objects() if there are no contained |
| 97 |
objects to create. Idea by Dave Rolsky. |
| 98 |
|
| 99 |
- return a reference from create_contained_objects() rather than a |
| 100 |
list of key/value pairs. This lets us pass it directly to validation |
| 101 |
routines. |
| 102 |
|
| 103 |
- Use the qr// format for regexes in the all_specs() method. |
| 104 |
|
| 105 |
- Improve the docs for allowed_params() - it's a class method (not an |
| 106 |
instance method), and it accepts a list of arguments that can |
| 107 |
affect the return value. |
| 108 |
|
| 109 |
- Don't copy as many hashes internally. Pass by reference. |
| 110 |
|
| 111 |
- Fixed some POD formatting problems. |
| 112 |
|
| 113 |
- Now requires Params::Validate version 0.23 |
| 114 |
|
| 115 |
0.05 Thu Jun 27 16:53:41 EST 2002 |
| 116 |
|
| 117 |
- Fixed a problem in create_contained_objects() in which a 'foo_class' |
| 118 |
parameter wouldn't get properly passsed to all the contained objects |
| 119 |
that needed to see it. |
| 120 |
|
| 121 |
- Added a documentation section "Scenario" explaining the main benefits |
| 122 |
of using the module. |
| 123 |
|
| 124 |
- Improved the output of show_containers(), notably the names of |
| 125 |
delayed classes |
| 126 |
|
| 127 |
- Merge $self->{container}{delayed} into $self->{container}{contained}, |
| 128 |
with a 'delayed' property. This allows simplification of the rest of |
| 129 |
the code in several places, notably the show_containers() routine. |
| 130 |
|
| 131 |
- Simplify show_containers() a little, and make it more accurate on |
| 132 |
contained objects' classes |
| 133 |
|
| 134 |
- Fixed a doc error in the first example |
| 135 |
|
| 136 |
- Added a bit in the first doc paragraph, saying that any of the |
| 137 |
Mason objects can be replaced by a subclass. |
| 138 |
|
| 139 |
- Added an internal comment about the strategy inside the |
| 140 |
allowed_params method. |
| 141 |
|
| 142 |
- Simplified the allowed_params method internally. |
| 143 |
|
| 144 |
- Got rid of special-casing to check for circular containment |
| 145 |
relationships. This seemed to have been added for HTML::Mason, but |
| 146 |
all Mason tests (as well as all Class::Container tests) still pass |
| 147 |
when I remove it. |
| 148 |
|
| 149 |
0.04 Wed Jun 26 19:15:26 EST 2002 |
| 150 |
|
| 151 |
- Add the show_containers() method, which should be a godsend during |
| 152 |
debugging. |
| 153 |
|
| 154 |
- Convert contained_objects() string specs to hashes upon input, rather |
| 155 |
than checking them every time they're used later in the code. |
| 156 |
|
| 157 |
- Change " if (%args)" to " if (keys %args)", which is more officially |
| 158 |
correct (though both would work in this particular case). |
| 159 |
|
| 160 |
0.03 Fri Jun 21 17:44:37 EST 2002 |
| 161 |
|
| 162 |
- Subclasses can now override contained_objects settings of their |
| 163 |
superclass (previously it was backwards). |
| 164 |
|
| 165 |
- Let call_method() accept arbitrary additional parameters, don't |
| 166 |
force them into a hash. |
| 167 |
|
| 168 |
- Added contained_class() method. |
| 169 |
|
| 170 |
- Use new contained_class() method inside call_method(). |
| 171 |
|
| 172 |
- delayed_object_class() shouldn't be settable, it'll mess up the |
| 173 |
parameters accepted. |
| 174 |
|
| 175 |
- The 'container' parameter shouldn't be shared among containers the way |
| 176 |
other parameters are. |
| 177 |
|
| 178 |
- Made create_delayed_object() a little more efficient by not shifting |
| 179 |
things off @_ - just pass @_ to the next new() method. |
| 180 |
|
| 181 |
- Don't check for $contained_class->can('allowed_params'), check for |
| 182 |
$contained_class->isa(__PACKAGE__). |
| 183 |
|
| 184 |
- Clarified a few error messages. |
| 185 |
|
| 186 |
- Clarified documentation and removed a couple of doc errors. |
| 187 |
|
| 188 |
|
| 189 |
0.02 Wed Jun 19 10:52:48 AEST 2002 |
| 190 |
- Made Scalar::Util a little more optional - the container() method |
| 191 |
is just a no-op if it's not around. |
| 192 |
|
| 193 |
- Use Params::Validate 0.18 new validate_with() method to set a |
| 194 |
meaningful subroutine name in error messages |
| 195 |
|
| 196 |
- Added the delayed_object_class() method |
| 197 |
|
| 198 |
- Documented how delayed objects are declared and created [Dave |
| 199 |
Rolsky] |
| 200 |
|
| 201 |
- Added some tests for the above stuff |
| 202 |
|
| 203 |
- Various documentation spruce-ups |
| 204 |
|
| 205 |
0.01_05 Fri May 10 15:29:46 AEST 2002 |
| 206 |
- If a container has two contained classes that both need to see a |
| 207 |
parameter of the same name, it will now be passed to both. Previously |
| 208 |
it was passed to one of them, randomly. |
| 209 |
|
| 210 |
- Added 2 tests for the above. |
| 211 |
|
| 212 |
- Added 4 tests to make sure class names can be properly overridden. |
| 213 |
|
| 214 |
- Got rid of _make_contained_object() method. |
| 215 |
|
| 216 |
- Changed the (undocumented) get_contained_objects() method to |
| 217 |
get_contained_object_spec(). |
| 218 |
|
| 219 |
- Added the container() method, to get a reference to the thingy that |
| 220 |
created you. Uses weak references if Scalar::Util is available. |
| 221 |
|
| 222 |
- Consolidated all Container metadata in $self->{container} (subject to |
| 223 |
change to {_container} or something). |
| 224 |
|
| 225 |
- Added call_method() method. |
| 226 |
|
| 227 |
0.01 Wed Mar 20 19:33:40 2002 |
| 228 |
- original version, based on HTML::Mason::Container |