File: tied_flags.t

package info (click to toggle)
libglib-perl 3%3A1.329-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,320 kB
  • sloc: perl: 4,938; ansic: 901; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
use Glib;
use Tie::Hash;
use Test::More tests => 1;

tie my %hash, 'Tie::StdHash';

my $pspec = Glib::ParamSpec->boxed('t', 't', 't',
                                   'Glib::Scalar', [qw/writable readable/]);
$hash{flags} = $pspec->get_flags;
ok (eval {
      Glib::ParamSpec->boxed('t', 't', 't',
                             'Glib::Scalar', $hash{flags});
      1
    });