Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 3. december 2021

Súbor: [Platon] / iotta / Iotta.pm (stiahnutie)

Revízia 1.1.1.1, Sun Feb 16 15:48:06 2003 UTC (18 years, 9 months ago) by yenar


Zmeny od 1.1: +0 -0 [lines]

initial import of iotta into platon cvs

package Iotta;
use strict;
use Carp;

our $AUTOLOAD;

#sub ieval {
#    my $self = shift;
#    my $expr = shift;
#    return eval "$expr";
#}

sub new {
    my $self = {};
    my $proto = shift;
    my $class = ref ($proto) || $proto;
    $self->{type}="";
    #$self->{_public} = 
    bless $self, $class;
    $self->initialize (@_);
    return $self;
}

sub initialize {
}

sub DESTROY {
}

sub AUTOLOAD {
    my $self = shift;
    my $type = ref ($self);
    my $name = $AUTOLOAD;
    my $ex = 0; my $priv = 1;
    my $err;
    $name =~ s/.*://;

    $ex = exists $self->{$name};
    $priv = $name eq "priv";
    if (!$ex || $priv) {
        $err = "cannot access nonexistent object member: $type->$name" unless $ex;
        $err = "cannot access private object member: $type->$name" if $priv;
        print STDERR "error: $err\n";
        my $i = 0;
        while ($i < 128) {
            my @bt = caller ($i);
            my $bt = join (" - ", @bt);
            print STDERR "$bt\n" if $bt;
            $i ++;
        }
        die "Fatal error";
    }

    if (@_)    {
        return $self->{$name} = shift;
    } else {
        return $self->{$name};
    }
}

sub main {
}

1;

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok