/usr/lib/x86_64-linux-gnu/perl5/5.22/QtCore4/signals.pm is in libqtcore4-perl 4:4.14.1-0ubuntu7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | package QtCore4::signals;
#
# Proposed usage:
#
# use QtCore4::signals changeSomething => ['int'];
#
use strict;
use warnings;
use Carp;
use QtCore4;
use Scalar::Util qw(looks_like_number);
our $VERSION = 0.60;
sub import {
no strict 'refs';
my $self = shift;
croak "Odd number of arguments in signal declaration" if @_%2;
my $caller = $self eq 'QtCore4::signals' ? (caller)[0] : $self;
my(@signals) = @_;
my $meta = \%{ $caller . '::META' };
# The perl metaObject holds info about signals and slots, inherited
# sig/slots, etc. This is what actually causes perl-defined sig/slots to
# be executed.
*{ "${caller}::metaObject" } = sub {
return Qt::_internal::getMetaObject($caller);
} unless defined &{ "${caller}::metaObject" };
# This makes any call to the signal name call XS_SIGNAL
Qt::_internal::installqt_metacall( $caller ) unless defined &{$caller."::qt_metacall"};
my $public = 1;
my %publicprivate;
@publicprivate{qw(public private)} = undef;
for ( my $i = 0; $i < @signals; $i += 2 ) {
my $signalname = $signals[$i];
my $signalargs = $signals[$i+1];
if ( exists $publicprivate{$signalname} &&
looks_like_number( $signalargs ) &&
$signalargs > 0 ) {
if ( $signalname eq 'public' ) {
$public = 1;
}
else {
$public = 0;
}
next;
}
# Build the signature for this signal
my $signature = join '', ("$signalname(", join(',', @{$signalargs}), ')');
# Normalize the signature, might not be necessary
$signature = Qt::MetaObject::normalizedSignature(
$signature )->data();
my $signal = {
name => $signalname,
signature => $signature,
public => $public,
};
push @{$meta->{signals}}, $signal;
Qt::_internal::installsignal("${caller}::$signalname") unless defined &{ "${caller}::$signalname" };
}
}
1;
|