From 795a0355a40293affc7164507e918440d4a828d6 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 1 Jan 2012 18:43:39 -0600 Subject: Move Qt --- PerlTQt/lib/TQt/GlobalSpace.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 PerlTQt/lib/TQt/GlobalSpace.pm (limited to 'PerlTQt/lib/TQt/GlobalSpace.pm') diff --git a/PerlTQt/lib/TQt/GlobalSpace.pm b/PerlTQt/lib/TQt/GlobalSpace.pm new file mode 100644 index 0000000..75f30a2 --- /dev/null +++ b/PerlTQt/lib/TQt/GlobalSpace.pm @@ -0,0 +1,25 @@ +package TQt::GlobalSpace; +use strict; +require TQt; +require Exporter; + +our @ISA = qw(Exporter); +our @EXPORT; +our $allMeth = TQt::_internal::findAllMethods( TQt::_internal::idClass("TQGlobalSpace") ); +no strict 'refs'; + +for my $proto( keys %$allMeth ) +{ + next if $proto =~ /operator\W/; # skip operators + $proto =~ s/[\#\$\?]+$//; + *{ $proto } = sub + { + $TQt::_internal::autoload::AUTOLOAD = "TQt::GlobalSpace\::$proto"; + goto &TQt::GlobalSpace::AUTOLOAD + } unless defined &$proto; + push @EXPORT, $proto; +} + +our %EXPORT_TAGS = ( "all" => [@EXPORT] ); + +1; \ No newline at end of file -- cgit v1.2.3