in reply to Automatic vivification of an object
The basic idea is that instead of creating an instance of a class, you would create an instance of the autovivifying class that calls an initialization function the first time it needs to
This smakes of a solution looking for a problem.
Two questions:
Smacks of a bad cure for a bad scoping problem; better corrected by correctly scoping the instantiation.
Quantify the benefit.
A third question: Why does your "example of usage" not actually run?
C:\test>t-autoVivify.pl Can't locate object method "new" via package "autovivify" (perhaps you + forgot to load "autovivify"?) at C:\test\t-autoVivify.pl line 29.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatic vivification of an object
by bounsy (Acolyte) on Jan 14, 2015 at 03:59 UTC | |
by BrowserUk (Patriarch) on Jan 14, 2015 at 09:45 UTC | |
by bounsy (Acolyte) on Jan 15, 2015 at 15:52 UTC | |
by Anonymous Monk on Jan 15, 2015 at 16:45 UTC | |
by bounsy (Acolyte) on Jan 15, 2015 at 18:48 UTC | |
by Anonymous Monk on Jan 14, 2015 at 08:46 UTC | |
by bounsy (Acolyte) on Jan 15, 2015 at 18:59 UTC |