Hello everybody, I'm trying to make a report of all Filters (from tags like: File,Change Requests,Tasks,Topic..) in Starteam.My trials are:
use Win32::OLE; use Win32::OLE::Enum; use Data::Dumper; use strict; # Alow for command-line parameters my $STServer= defined($ARGV[0]) ? $ARGV[0] : 'localhost'; my $STPort = defined($ARGV[1]) ? $ARGV[1] : '49201'; my $STUser = defined($ARGV[2]) ? $ARGV[2] : "Administrator"; my $STPw = defined($ARGV[3]) ? $ARGV[3] : 'Administrator'; my $STServerFactory = CreateObject Win32::OLE "StarTeam.StServerFactor +y"; my $STServer = $STServerFactory->Create($STServer, $STPort); if (! defined $STServer) { print STDERR "Error: Cannot create STServer object!\n"; } $STServer->connect(); my $user = $STServer->logOn($STUser, $STPw); if (! defined ($user) ) { print STDERR "Error: Cannot logon!\n"; } my $FileTypeName = $STServer->TypeNames->FILE; my $CRTypeName = $STServer->TypeNames->CHANGEREQUEST; my $TaskTypeName = $STServer->TypeNames->TASK; my $TopicTypeName = $STServer->TypeNames->TOPIC; my $AuditTypeName = $STServer->TypeNames->AUDIT; my @projects = getProjectObjects($STServer); $STServer->disconnect; #______________________________________________________________ sub getProjectObjects { my @projects = Win32::OLE::Enum->All($STServer->Projects); foreach my $p (@projects) { my $project = $p->Name(); print "\nPROJECT: $project\n"; runViewsOfProject($p); } return @projects; } #______________________________________________________________ sub runViewsOfProject { my ($project) = @_; my $DefaultView = $project->DefaultView()->Name(); my @views = Win32::OLE::Enum->All($project->Views); print "\tDEFAULT-VIEW: $DefaultView\n"; foreach my $v (@views) { # print "\tVIEW: " . $v->Name() . "\tPath: ". $v->Path() . "\n"; # runLabelsOfView($v); runFoldersOfView($v->RootFolder); } return @views; } #___________________________________________________________ sub runFoldersOfView { my ($folder) = @_; my $folder_name = $folder->Name(); # print "\n\t\t\tROOTFOLDER: $folder_name\n"; runSubFoldersOfFolder($folder); } #______________________________________________________________ sub runSubFoldersOfFolder { my ($folder) = @_; runItemsOfFolder($folder); my @subfolder = Win32::OLE::Enum->All($folder->SubFolders); foreach my $subf (@subfolder) { # print "\t\t\tSUBFOLDER : " . $subf->Name() . "(" . $subf->Fold +erHierarchy . ")\n"; runSubFoldersOfFolder($subf); } } #___________________________________________________________ sub runItemsOfFolder { my ($folder) = @_; my $id; my $name; #my @files = $folder->getItems("File"); my @files = Win32::OLE::Enum->All($folder->getItems($FileTypeName)) +; my @ua=Win32::OLE::Enum->All($STServer->Users); my $tag_files=$STServer->$FileTypeName; print $tag_files; my @filters= Win32::OLE::Enum->All($tag_files->Filters); foreach my $f (@files) { #my @filters=Win32::OLE::Enum->All($f->Filter); foreach my $filter (@filters) { print $filter."\n"; } } }

As you you can see I've tried to extract the Filters from File which extracts from Stserver => And I've tried to extract the Filters from each file in each folder====> None of this works!
Can you help me with this and tell me from what should I extract the Strarteam's Filters?

In reply to Making reports from Starteam in perl by Nelly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.