From b2af005db21bd8fd068cb79b2ae700953128af2c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 1 Jan 2012 18:29:30 -0600 Subject: Move PerlQt --- PerlTQt/lib/Qt/GlobalSpace.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 PerlTQt/lib/Qt/GlobalSpace.pm (limited to 'PerlTQt/lib/Qt/GlobalSpace.pm') diff --git a/PerlTQt/lib/Qt/GlobalSpace.pm b/PerlTQt/lib/Qt/GlobalSpace.pm new file mode 100644 index 0000000..75f30a2 --- /dev/null +++ b/PerlTQt/lib/Qt/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