3 Einträge, 1 Seite |
[DIE] Can't locate object method "new" via package "Form::Show" (perhaps you forgot to load "Form::Show"?) at Form/Allocator.pm line 29.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
sub allocate { my $self = shift; #my $load_package = ucfirst($self->get_cmd); my $load_package = 'Show'; #require Form::Show; #Form::Show->new($self->get_parameters); eval { "use Form::" .$load_package; "Form::$load_package" ->new($self->get_parameters); }; die("[DIE] $@") if $@; }#sub allocate
1 2 3 4 5 6 7 8 9 10 11 12 13 14
sub allocate { my $self = shift; #my $load_package = ucfirst($self->get_cmd); my $load_package = 'Show'; require Form::Show; Form::Show->new($self->get_parameters); #eval { # "use Form::" .$load_package; #"Form::$load_package" ->new($self->get_parameters); #}; #die("[DIE] $@") if $@; }#sub allocate
styx-cc+2008-05-04 19:39:08--Holla,
eine kleine Frage:
Dieses Konstrukt funktioniert so nicht, er bleibt bei Zeile 11 haengen:
Code: (dl )[DIE] Can't locate object method "new" via package "Form::Show" (perhaps you forgot to load "Form::Show"?) at Form/Allocator.pm line 29.
Code (perl): (dl )1 2 3 4 5 6 7 8 9 10 11 12 13 14sub allocate { my $self = shift; #my $load_package = ucfirst($self->get_cmd); my $load_package = 'Show'; #require Form::Show; #Form::Show->new($self->get_parameters); eval { "use Form::" .$load_package; "Form::$load_package" ->new($self->get_parameters); }; die("[DIE] $@") if $@; }#sub allocate
1 2
my $obj = eval "use Form::$load_package;\n Form::$load_package->new(\$self->get_parameters);";
3 Einträge, 1 Seite |