Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-193

Fix Perl namespaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1
    • 0.1
    • Perl - Compiler
    • None
    • Patch Available

    Description

      I just had a look at the Perl stuff generated from tutorial.thrift:

      ....tutorial/gen-perl/
      ........shared/
      ............Constants.pm
      ............Types.pm
      ........tutorial/
      ............Constants.pm
      ............Types.pm
      ........Calculator.pm
      ........SharedService.pm

      Since 'Calculator' (resp. 'SharedService') is defined in 'tutorial.thrift'
      (resp. 'shared.thrift'), whose namespace declaration is 'tutorial' (resp.
      'shared'), I would have expected the following:

      ....tutorial/gen-perl/
      ........shared/
      ............Constants.pm
      ............Types.pm
      ............SharedService.pm
      ........tutorial/
      ............Constants.pm
      ............Types.pm
      ............Calculator.pm

      (Which is what you get for Python, by the way)

      With the current layout, if I want to define a service called 'Calculator'
      under my own namespace 'foo', I would get:

      ....foo/
      ........Constants.pm
      ........Types.pm
      ....Calculator.pm

      ,which would clash with Calculator.pm generated from tutorial.thrift.

      Attachments

        1. perl-namespaces.diff
          8 kB
          Carlos Valiente

        Activity

          People

            tjake T Jake Luciani
            carlos.valiente Carlos Valiente
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: