From bcc95cd92ca12c1783464b8ada6816d430dc0e98 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 03:08:08 -0600 Subject: Initial import of libqt-perl (not yet TQt compatible) --- PerlQt/lib/Qt/GlobalSpace.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 PerlQt/lib/Qt/GlobalSpace.pm (limited to 'PerlQt/lib/Qt/GlobalSpace.pm') 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 -- cgit v1.2.1