Conjury-Core
view release on metacpan or search on metacpan
lib/Conjury/Core.pm view on Meta::CPAN
The 'Directory' method returns the name of the directory associated with the
context.
The C<$Current_Context> package variable always contains a reference to the
current context object. The C<$Top_Context> package variable always contains a
reference to the context at the top of the source file hierarchy.
=cut
sub _new_f() { __PACKAGE__ . '::new' }
BEGIN {
my $proto;
$proto = Conjury::Core::Prototype->new;
$proto->optional_arg
(Directory => \&Conjury::Core::Prototype::validate_scalar);
$proto->optional_arg
(Spells_By_Name => \&Conjury::Core::Prototype::validate_hash);
$proto->optional_arg
lib/Conjury/Core.pm view on Meta::CPAN
Create a C<Conjury::Core::Stage> object with its C<new> method. Create
subdirectories within the stage using the C<make_subdir> method.
=over 4
=cut
my %journal_name;
sub _new_f() { __PACKAGE__ . '::new' }
BEGIN {
my $proto;
$proto = Conjury::Core::Prototype->new;
$proto->optional_arg
(Directory => \&Conjury::Core::Prototype::validate_scalar);
$proto->optional_arg
(Journal => $validator{scalar_or_hash});
$prototype{_new_f()} = $proto;
lib/Conjury/Core.pm view on Meta::CPAN
or one of its factors has a new signature.
If a factor of a spell specifies a file not produced by any spells, that file
is treated as a source file, and its modification time is appended to the
profile of the spell which considers it a factor. In this way, changes to the
modification time of a source file results in a cascading change to the
signature of every spell that references it in its tree of factors.
=cut
sub _new_f() { __PACKAGE__ . '::new' }
BEGIN {
my $proto;
$proto = Conjury::Core::Prototype->new;
$proto->optional_arg
(Journal => $validator{scalar_or_hash});
$proto->optional_arg
(Factors => \&Conjury::Core::Prototype::validate_array);
$proto->optional_arg
lib/Conjury/Core.pm view on Meta::CPAN
The C<name_spell>, C<fetch_spells> and C<find_stage> functions should probably
be moved into an appropriate Conjury::Core::Xxxxx namespace. If they stay
where they are, then the contents of C<@EXPORT> should be moved to
C<@EXPORT_OK>. It remains unclear what is the right thing to do here-- but it
will be. It will.
=over 4
=cut
sub _cast_f() { __FILE__ . '/cast' }
sub _cast_warning_f() { __PACKAGE__ . '::cast_warning' }
sub _cast_error_f() { __PACKAGE__ . '::cast_error' }
sub _execute_f() { __PACKAGE__ . '::execute' }
sub _name_spell_f() { __PACKAGE__ . '::name_spell' }
sub _fetch_spells_f() { __PACKAGE__ . '::fetch_spells' }
sub _find_stage_f() { __PACKAGE__ . '::find_state' }
sub _deferral_f() { __PACKAGE__ . '::deferral' }
sub _filecopy_f() { __PACKAGE__ . '::filecopy' }
sub _dispell_f() { __PACKAGE__ . '::dispell' }
BEGIN {
my $proto;
$proto = Conjury::Core::Prototype->new;
$proto->optional_arg
(Context => $validator{context_object});
$proto->optional_arg
(Name => $validator{scalar_or_array_of_scalar});
$prototype{_cast_f()} = $proto;
lib/Conjury/Core/Prototype.pm view on Meta::CPAN
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.
require 5.005;
use strict;
package Conjury::Core::Prototype;
use Carp qw/&croak/;
sub new($%) {
my ($this) = @_;
croak __PACKAGE__, '::new-- unexpected arguments' if (@_ > 1);
my $class = ref $this || $this;
$this =
{Required => { },
Optional => { }};
bless $this, $class;
( run in 0.293 second using v1.01-cache-2.11-cpan-1f129e94a17 )