summaryrefslogtreecommitdiffstats
path: root/PerlTQt/lib/Qt/isa.pm
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-01 18:43:39 -0600
committerTimothy Pearson <[email protected]>2012-01-01 18:43:39 -0600
commit795a0355a40293affc7164507e918440d4a828d6 (patch)
tree9724723196b77633801918030aa2e293dc8246fb /PerlTQt/lib/Qt/isa.pm
parent55e5c730361b5f2640f155aef4518ca69c4fc1b4 (diff)
downloadlibtqt-perl-795a0355a40293affc7164507e918440d4a828d6.tar.gz
libtqt-perl-795a0355a40293affc7164507e918440d4a828d6.zip
Move Qt
Diffstat (limited to 'PerlTQt/lib/Qt/isa.pm')
-rw-r--r--PerlTQt/lib/Qt/isa.pm81
1 files changed, 0 insertions, 81 deletions
diff --git a/PerlTQt/lib/Qt/isa.pm b/PerlTQt/lib/Qt/isa.pm
deleted file mode 100644
index 71e9391..0000000
--- a/PerlTQt/lib/Qt/isa.pm
+++ /dev/null
@@ -1,81 +0,0 @@
-package TQt::isa;
-use strict;
-
-sub import {
- no strict 'refs';
- my $class = shift;
- my $caller = (caller)[0];
-
- # Trick 'use' into believing the file for this class has been read
- my $pm = $caller . ".pm";
- $pm =~ s!::!/!g;
- unless(exists $::INC{$pm}) {
- $::INC{$pm} = $::INC{"TQt/isa.pm"};
- }
-
- for my $super (@_) {
- push @{ $caller . '::ISA' }, $super;
- push @{ ${$caller . '::META'}{'superClass'} }, $super; # if isa(TQObject)?
- }
-
- *{ $caller . '::className' } = sub { # closure on $caller
- return $caller;
- };
-
- ${ $caller. '::_INTERNAL_STATIC_'}{'SUPER'} = bless {}, " $caller";
- TQt::_internal::installsuper($caller) unless defined &{ $caller.'::SUPER' };
-
- *{ $caller . '::metaObject' } = sub {
- TQt::_internal::getMetaObject($caller);
- };
-
- *{ $caller . '::import' } = sub {
- my $name = shift; # classname = function-name
- my $incaller = (caller)[0];
- $incaller = (caller(1))[0] if $incaller eq 'if'; # work-around bug in package 'if' pre 0.02
- (my $cname = $name) =~ s/.*::// and do
- {
- *{ "$name" } = sub {
- $name->new(@_);
- } unless defined &{ "$name" };
- };
- my $p = defined $&? $&:'';
- $p eq ($incaller=~/.*::/?($p?$&:''):'') and
- *{ "$incaller\::$cname" } = sub {
- $name->new(@_);
- };
-
- if(defined @{ ${$caller.'::META'}{'superClass'} } &&
- @{ ${$caller.'::META'}{'superClass'} } )
- {
- # attributes inheritance
- for my $attribute( keys %{ ${$caller.'::META'}{'attributes'} } )
- {
- if(! defined &{$incaller.'::'.$attribute })
- {
- TQt::_internal::installattribute($incaller, $attribute);
- ${ ${$incaller .'::META'}{'attributes'} }{$attribute} = 1;
- }
- }
- }
- };
-
- TQt::_internal::installautoload(" $caller");
- TQt::_internal::installautoload(" $caller");
- TQt::_internal::installautoload($caller);
- {
- package TQt::AutoLoad;
- my $autosub = \&{ " $caller\::_UTOLOAD" };
- *{ " $caller\::AUTOLOAD" } = sub { &$autosub };
- $autosub = \&{ " $caller\::_UTOLOAD" };
- *{ " $caller\::AUTOLOAD" } = sub { &$autosub };
- $autosub = \&{ "$caller\::_UTOLOAD" };
- *{ "$caller\::AUTOLOAD" } = sub { &$autosub };
- }
- TQt::_internal::installthis($caller);
-
- # operator overloading
- *{ " $caller\::ISA" } = ["TQt::base::_overload"];
-}
-
-1;