Sponsored Content
Top Forums Programming Read 1 of 2 keyboards connected Post 302982100 by SerKan on Friday 23rd of September 2016 05:07:33 PM
Old 09-23-2016
It seems that EVIOCGRAB is the key!

I'm going to test the Corona688's code after checking all that wisecracker has said.

After some testing, I will be back again.
Many thanks to you!
 

10 More Discussions You Might Find Interesting

1. AIX

How can I get Information about who is connected???

Hello, I'm new here and I come from Germany. At our AIX-ORACLE-System someone has deleted one important file and we'd like to find out who did this, next time. Is there any command to find out who is connected? I'm not trying to find out if it's root, etc., I'd like to get the DNS-Name or... (3 Replies)
Discussion started by: Huch
3 Replies

2. Programming

Connected or not connected !

Hello ! I've got a question . I really don't het this point. Let's supose that I have a client connected to a server. I want the server IMEDIATLY know if the client is diconnected . How can I realize this ? :mad: Amd I'm just curios about one thing. I have a server and multiple clients... (3 Replies)
Discussion started by: !_30
3 Replies

3. IP Networking

check whether connected to network

hi... can anyone pls suggest a few methods to check whether a computer is connected to any network, using the terminal, not GUI. thanks eskay (1 Reply)
Discussion started by: eskay_karthik
1 Replies

4. UNIX for Advanced & Expert Users

linux connected to as400

we have a as400 5rev4 and want to use a rhel server to use as a file server. We exported a drive on the rhel box and then mounted it on the as400. We can see the top directory in our mounted as400 directory but when we attempt access subdirectories we get a no matching object error. When we open... (2 Replies)
Discussion started by: javagair
2 Replies

5. AIX

How do I know to which storage I am connected

Hello everyone. We have a environment where we have DS8K storage and ES800 storage, the way to check to which storage the box is connected is using the LUN ID I get frm " pcmpath query device " command. for ex: 75CXX - DS8K storage 26860 - ES 800 Storage I was told to check... (4 Replies)
Discussion started by: nivaspIND
4 Replies

6. IP Networking

Am I Connected?

Be Gentle folks, I am a baby OpenSuSe 11.2 user :-) In windows Vista, there is a world in the systray when you are Internet connected and not just local. I have searched all over for a .RPM for the Network Manager or another packeg in Suse that can show me the same thing or something close. ... (0 Replies)
Discussion started by: donmaxwelliii
0 Replies

7. UNIX for Dummies Questions & Answers

Non Internet connected distribution

Hi all I've been a Debian user since solidly since about 1997 so I'm fairly experienced Linux user as a whole but unfortunately the monoculture has hit be hard recently. I'm working off a Laptop a lot of the time which spends up to 2-4 weeks without an Internet connection. A few weeks ago it... (1 Reply)
Discussion started by: pointyhat
1 Replies

8. UNIX for Dummies Questions & Answers

Ftp showing connected only

hi, good morning. Anyone can help me out. A trying to ftp from server A to server B. from server A to B its working fine but from server B to A, its only showing connected only: finap7 #ftp 10.10.10.210 Connected to 10.10.10.210. I refresh the inetd but nothing is happening. Please... (1 Reply)
Discussion started by: kamaldev
1 Replies

9. OS X (Apple)

How to see connected macs through terminal?

Been a while since I've been here; I have my iMac and MBpro connected via firewire, and they can see each other when I open the finder windows. But I'd like to be able to 'see' each computer on the other via the terminal application; and I can't see them right now. I can transfer files via the... (0 Replies)
Discussion started by: Straitsfan
0 Replies

10. IP Networking

Connected to IANA anyway, why?

May someone can answer this. Anytime I ignite my laptop to go online I see via etherape that I am connected to IANA as shown below. Is my provider redirecting me there, the cable under the sea, what is the reason for this? This happened with a pretty normal desktop PC, as well with my ancient... (2 Replies)
Discussion started by: 1in10
2 Replies
Test::Perl::Critic::Policy(3pm) 			User Contributed Perl Documentation			   Test::Perl::Critic::Policy(3pm)

NAME
Test::Perl::Critic::Policy - A framework for testing your custom Policies SYNOPSIS
use Test::Perl::Critic::Policy qw< all_policies_ok >; # Assuming .run files are inside 't' directory... all_policies_ok() # Or if your .run files are in a different directory... all_policies_ok( '-test-directory' => 'run' ); # And if you just want to run tests for some polices... all_policies_ok( -policies => ['Some::Policy', 'Another::Policy'] ); # If you want your test program to accept short Policy names as # command-line parameters... # # You can then test a single policy by running # "perl -Ilib t/policy-test.t My::Policy". my %args = @ARGV ? ( -policies => [ @ARGV ] ) : (); all_policies_ok(%args); DESCRIPTION
This module provides a framework for function-testing your custom Perl::Critic::Policy modules. Policy testing usually involves feeding it a string of Perl code and checking its behavior. In the old days, those strings of Perl code were mixed directly in the test script. That sucked. NOTE: This module is alpha code -- interfaces and implementation are subject to major changes. This module is an integral part of building and testing Perl::Critic itself, but you should not write any code against this module until it has stabilized. IMPORTABLE SUBROUTINES
all_policies_ok('-test-directory' => $path, -policies => @policy_names) Loads all the *.run files beneath the "-test-directory" and runs the tests. If "-test-directory" is not specified, it defaults to t/. "-policies" is an optional reference to an array of shortened Policy names. If "-policies" specified, only the tests for Policies that match one of the "m/$POLICY_NAME/imx" will be run. CREATING THE *.run FILES Testing a policy follows a very simple pattern: * Policy name * Subtest name * Optional parameters * Number of failures expected * Optional exception expected * Optional filename for code Each of the subtests for a policy is collected in a single .run file, with test properties as comments in front of each code block that describes how we expect Perl::Critic to react to the code. For example, say you have a policy called Variables::ProhibitVowels: (In file t/Variables/ProhibitVowels.run) ## name Basics ## failures 1 ## cut my $vrbl_nm = 'foo'; # Good, vowel-free name my $wango = 12; # Bad, pronouncable name ## name Sometimes Y ## failures 1 ## cut my $yllw = 0; # "y" not a vowel here my $rhythm = 12; # But here it is These are called "subtests", and two are shown above. The beauty of incorporating multiple subtests in a file is that the .run is itself a (mostly) valid Perl file, and not hidden in a HEREDOC, so your editor's color-coding still works, and it is much easier to work with the code and the POD. If you need to pass any configuration parameters for your subtest, do so like this: ## parms { allow_y => '0' } Note that all the values in this hash must be strings because that's what Perl::Critic will hand you from a .perlcriticrc. If it's a TODO subtest (probably because of some weird corner of PPI that we exercised that Adam is getting around to fixing, right?), then make a "##TODO" entry. ## TODO Should pass when PPI 1.xxx comes out If the code is expected to trigger an exception in the policy, indicate that like so: ## error 1 If you want to test the error message, mark it with "/.../" to indicate a "like()" test: ## error /Can't load Foo::Bar/ If the policy you are testing cares about the filename of the code, you can indicate that "fcritique" should be used like so (see "fcritique" for more details): ## filename lib/Foo/Bar.pm The value of "parms" will get "eval"ed and passed to "pcritique()", so be careful. In general, a subtest document runs from the "## cut" that starts it to either the next "## name" or the end of the file. In very rare circumstances you may need to end the test document earlier. A second "## cut" will do this. The only known need for this is in t/Miscellanea/RequireRcsKeywords.run, where it is used to prevent the RCS keywords in the file footer from producing false positives or negatives in the last test. Note that nowhere within the .run file itself do you specify the policy that you're testing. That's implicit within the filename. BUGS AND CAVEATS AND TODO ITEMS
Add policy_ok() method for running subtests in just a single TODO file. Can users mark this entire test as TODO or SKIP, using the normal mechanisms? Allow us to specify the nature of the failures, and which one. If there are 15 lines of code, and six of them fail, how do we know they're the right six? Consolidate code from Perl::Critic::TestUtils and possibly deprecate some functions there. Write unit tests for this module. Test that we have a t/*/*.run for each lib/*/*.pm AUTHOR
Andy Lester, Jeffrey Ryan Thalhammer <thaljef@cpan.org> COPYRIGHT
Copyright (c) 2009-2011 Andy Lester. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Test::Perl::Critic::Policy(3pm)
All times are GMT -4. The time now is 08:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy