IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage Perl Discussion :

suppression de messages


Sujet :

Langage Perl

  1. #1
    Membre émérite
    Avatar de Jasmine80
    Femme Profil pro
    Bioinformaticienne
    Inscrit en
    Octobre 2006
    Messages
    3 157
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 44
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Bioinformaticienne
    Secteur : Santé

    Informations forums :
    Inscription : Octobre 2006
    Messages : 3 157
    Points : 2 673
    Points
    2 673
    Par défaut suppression de messages
    Bonjour,

    Quand j'exécute certains scripts, j'obtiens parfois des messages tels que :
    Subroutine AUTOLOAD redefined at C:/Perl/site/lib/Time/HiRes.pm line 30.
    Subroutine import redefined at C:/Perl/site/lib/Time/HiRes.pm line 48.
    Subroutine tv_interval redefined at C:/Perl/site/lib/Time/HiRes.pm line 69.
    Ce n'est pas sur la sortie standard, c'est la même sortie que celle des messages de warn(), comment s'appelle cette sortie, est STDERR? Comment puis-je supprimer ces messages (et si possible pas ceux de mes warn())?


    Merci,
    -- Jasmine --

  2. #2
    Membre émérite
    Avatar de Jasmine80
    Femme Profil pro
    Bioinformaticienne
    Inscrit en
    Octobre 2006
    Messages
    3 157
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 44
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Bioinformaticienne
    Secteur : Santé

    Informations forums :
    Inscription : Octobre 2006
    Messages : 3 157
    Points : 2 673
    Points
    2 673
    Par défaut
    Perldoc n'est pas très généreux sur la documentation au sujet de STDERR
    Search results

    Results for your query "STDERR" were found in the following sections:
    FAQs

    * How can I capture STDERR from an external command?
    ... quel tutoriel puis-je lire?

    Merci,
    -- Jasmine --

  3. #3
    Expert éminent
    Avatar de Jedai
    Homme Profil pro
    Enseignant
    Inscrit en
    Avril 2003
    Messages
    6 245
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Avril 2003
    Messages : 6 245
    Points : 8 586
    Points
    8 586
    Par défaut
    STDERR est la sortie standard d'erreur, elle fait partie des trois handles distribués à tout processus par l'OS (entrée standard, sortie standard, sortie d'erreur). J'aimerais bien voir le code qui provoque ces warnings, a priori ils peuvent être supprimé en ajoutant "no warnings qw/redefine/;" avant, mais peut-être s'agit-il d'un warning légitime.

    --
    Jedaï

  4. #4
    Membre émérite
    Avatar de Jasmine80
    Femme Profil pro
    Bioinformaticienne
    Inscrit en
    Octobre 2006
    Messages
    3 157
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 44
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Bioinformaticienne
    Secteur : Santé

    Informations forums :
    Inscription : Octobre 2006
    Messages : 3 157
    Points : 2 673
    Points
    2 673
    Par défaut
    Ce message d'erreur venait du script où j'essayais d'utiliser la fonction :hireswallclock avec le module Benchmark::Stopwatch.

    Comment sait-on si un message est légitime? Quand c'est une redéfinition de localisation, cela peut-il être un message dont on doit tenir compte?


    Par exemple pour ce script, j'ai systématiquement

    -------------------- WARNING ---------------------
    MSG: [NC_002655] is not a normal sequence database but a RefSeq entry. Redirecting the request.

    ---------------------------------------------------
    Subroutine new redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 80, <GEN1> line 49.
    Subroutine start redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 102, <GEN1> line 49.
    Subroutine end redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 128, <GEN1> line 49.
    Subroutine length redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 165, <GEN1> line 49.
    Subroutine location_type redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 256, <GEN1> line 49.
    Subroutine to_FTstring redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 303, <GEN1> line 49.
    Subroutine trunc redefined at C:/Perl/site/lib/Bio\Location\Simple.pm line 334, <GEN1> line 49.
    Subroutine new redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 91, <GEN1> line 124.
    Subroutine each_Location redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 123, <GEN1> line 124.
    Subroutine sub_Location redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 152, <GEN1> line 124.
    Subroutine add_sub_Location redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 221, <GEN1> line 124.
    Subroutine splittype redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 245, <GEN1> line 124.
    Subroutine is_single_sequence redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 273, <GEN1> line 124.
    Subroutine guide_strand redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 298, <GEN1> line 124.
    Subroutine strand redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 326, <GEN1> line 124.
    Subroutine flip_strand redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 367, <GEN1> line 124.
    Subroutine start redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 388, <GEN1> line 124.
    Subroutine end redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 407, <GEN1> line 124.
    Subroutine min_start redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 426, <GEN1> line 124.
    Subroutine max_start redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 448, <GEN1> line 124.
    Subroutine start_pos_type redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 471, <GEN1> line 124.
    Subroutine min_end redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 492, <GEN1> line 124.
    Subroutine max_end redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 515, <GEN1> line 124.
    Subroutine end_pos_type redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 539, <GEN1> line 124.
    Subroutine seq_id redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 565, <GEN1> line 124.
    Subroutine to_FTstring redefined at C:/Perl/site/lib/Bio\Location\Split.pm line 611, <GEN1> line 124.
    Subroutine new redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 134, <GEN1> line 218.
    Subroutine location_type redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 161, <GEN1> line 218.
    Subroutine start redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 223, <GEN1> line 218.
    Subroutine end redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 250, <GEN1> line 218.
    Subroutine min_start redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 277, <GEN1> line 218.
    Subroutine max_start redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 296, <GEN1> line 218.
    Subroutine start_pos_type redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 316, <GEN1> line 218.
    Subroutine min_end redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 346, <GEN1> line 218.
    Subroutine max_end redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 365, <GEN1> line 218.
    Subroutine end_pos_type redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 385, <GEN1> line 218.
    Subroutine to_FTstring redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 456, <GEN1> line 218.
    Subroutine _fuzzypointdecode redefined at C:/Perl/site/lib/Bio\Location\Fuzzy.pm line 557, <GEN1> line 218.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    #!/usr/local/bin/perl
     
    use strict;
     
    use Bio::DB::GenBank;
     
     
     
    my @request = qw (NC_002655 EU146964 EF064820 EF064819);
     
     
    my $gb = new Bio::DB::GenBank;
     
    foreach my $acc (@request){
        # Recherche dans Genbank
        #--------------------------
        my $info = $gb->get_Seq_by_acc($acc);
        my $seq = $info->seq();
        print $acc." : ".length($seq)." nucléotides\n";
    }
    ... alors que je n'utilise même pas le pragma warnings.


    Merci pour ton aide.
    -- Jasmine --

Discussions similaires

  1. Afficher un message de confirmation avant suppression des messages
    Par JackBeauregard dans le forum Général JavaScript
    Réponses: 16
    Dernier message: 18/08/2006, 13h17
  2. Requête SQL d'ajout, suppression du message de confirmation ?
    Par Jeff77 dans le forum Requêtes et SQL.
    Réponses: 2
    Dernier message: 24/07/2006, 22h52
  3. Réponses: 11
    Dernier message: 07/07/2006, 19h24
  4. suppression des messages
    Par Invité dans le forum Mode d'emploi & aide aux nouveaux
    Réponses: 2
    Dernier message: 18/04/2006, 14h24
  5. Réponses: 11
    Dernier message: 25/11/2005, 09h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo