summaryrefslogtreecommitdiffstats
path: root/PerlQt/lib/Qt/GlobalSpace.pm
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-18 03:08:08 -0600
committerTimothy Pearson <[email protected]>2011-12-18 03:08:08 -0600
commitbcc95cd92ca12c1783464b8ada6816d430dc0e98 (patch)
tree4701c447365db5392df0174b4bb00b5b5c369da4 /PerlQt/lib/Qt/GlobalSpace.pm
downloadlibtqt-perl-bcc95cd92ca12c1783464b8ada6816d430dc0e98.tar.gz
libtqt-perl-bcc95cd92ca12c1783464b8ada6816d430dc0e98.zip
Initial import of libqt-perl (not yet TQt compatible)
Diffstat (limited to 'PerlQt/lib/Qt/GlobalSpace.pm')
-rw-r--r--PerlQt/lib/Qt/GlobalSpace.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/PerlQt/lib/Qt/GlobalSpace.pm b/PerlQt/lib/Qt/GlobalSpace.pm
new file mode 100644
index 0000000..65e481a
--- /dev/null
+++ b/PerlQt/lib/Qt/GlobalSpace.pm
@@ -0,0 +1,25 @@
+package Qt::GlobalSpace;
+use strict;
+require Qt;
+require Exporter;
+
+our @ISA = qw(Exporter);
+our @EXPORT;
+our $allMeth = Qt::_internal::findAllMethods( Qt::_internal::idClass("QGlobalSpace") );
+no strict 'refs';
+
+for my $proto( keys %$allMeth )
+{
+ next if $proto =~ /operator\W/; # skip operators
+ $proto =~ s/[\#\$\?]+$//;
+ *{ $proto } = sub
+ {
+ $Qt::_internal::autoload::AUTOLOAD = "Qt::GlobalSpace\::$proto";
+ goto &Qt::GlobalSpace::AUTOLOAD
+ } unless defined &$proto;
+ push @EXPORT, $proto;
+}
+
+our %EXPORT_TAGS = ( "all" => [@EXPORT] );
+
+1; \ No newline at end of file