[Templates-cvs] cvs commit: TT3/lib/Template/TT3 VObject.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Sat, 06 Dec 2003 16:00:06 +0000
cvs 03/12/06 16:00:05
Added: lib/Template/TT3 VObject.pm
Log:
* added VObject base class and Hash and List virtual object modules
Revision Changes Path
1.1 TT3/lib/Template/TT3/VObject.pm
Index: VObject.pm
===================================================================
#============================================================= -*-perl-*-
#
# Template::TT3::VObject
#
# DESCRIPTION
# Base class module for the TT Virtual Object which implements
# Virtual Methods.
#
# AUTHOR
# Andy Wardley <abw@wardley.org>
#
# COPYRIGHT
# Copyright (C) 1996-2003 Andy Wardley. All Rights Reserved.
# Copyright (C) 1998-2002 Canon Research Centre Europe Ltd.
#
# This module is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# REVISION
# $Id: VObject.pm,v 1.1 2003/12/06 16:00:05 abw Exp $
#
#========================================================================
package Template::TT3::VObject;
use strict;
use warnings;
use Template::TT3::Base;
use vars qw( $VERSION $DEBUG $ERROR $WARNING $VCLASS $VMETHOD );
use base qw( Template::TT3::Base );
$VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
$DEBUG = 0 unless defined $DEBUG;
$ERROR = '';
$VCLASS = 'VObject';
$VMETHOD = { };
sub vmethod {
my $class = shift;
no strict 'refs';
return ${"$class\::VMETHOD"} || { };
}
sub vobject {
my $class = shift;
no strict 'refs';
return ${"$class\::VCLASS"} || { };
}
1;
__END__
=head1 NAME
Template::TT3::VObject - base class virtual object
=head1 SYNOPSIS
package Template::VObject::SomeObjectType;
use Template::TT3::VObject;
use base qw( Template::TT3::VObject );
# TODO
=head1 DESCRIPTION
# TODO
=head1 METHODS
=head2 new()
# TODO
=head1 AUTHOR
Andy Wardley E<lt>abw@wardley.orgE<gt>
=head1 VERSION
$Revision: 1.1 $
=head1 COPYRIGHT
Copyright (C) 1996-2003 Andy Wardley. All Rights Reserved.
Copyright (C) 1998-2002 Canon Research Centre Europe Ltd.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut
# Local Variables:
# mode: perl
# perl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# vim: expandtab shiftwidth=4: