I have been having a play around with TT and was wondering why there is a spare empty attribute in the object. This only happens when there are no mandatory arguments and is caused by the following bit of code in Base.pm

    sub new {
    .........
        $self = bless {
        map { ($_ => shift @args) } @$argnames,
        _ERROR  => ''
        }, $class;
    .........
    }

becasue not all objects have mandatory arguments the above bit of code appears to create an object that looks like ( I have snipped a lot so it might not be 100% correct )


Template Object ==> $VAR1 = bless( { '' => undef, <------- ? ? ? ? '_ERROR' => undef }, 'Template' );

Is the line pointed to above there for a reason and if so what is it? Just curious.

--

Regards,
Harry Jackson.

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to