[DOCS-12826] Incorrect docs for connecting Perl driver to MongoDB Atlas Created: 23/Jun/19  Updated: 29/Oct/23  Resolved: 26/Jun/19

Status: Closed
Project: Documentation
Component/s: drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Frederic T. Assignee: Chris Bush
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

cloud.mongodb.com connect string and Documentation Perl driver


Attachments: File docs_mongodb_com_ecosystem_drivers_perl.patch    
Issue Links:
Related
Participants:
Days since reply: 4 years, 33 weeks ago
Story Points: 1

 Description   

On the https://docs.mongodb.com/ecosystem/drivers/perl/ the section Connect to MongoDB Atlas has a subtle bug because in Perl double quote " and simple quote ' are different. With double quote, something like "@cluster0" becomes interpolated as an undefined variable.

It should be:

use MongoDB;
 
my $client = MongoDB->connect(
   'mongodb+srv://<username>:<password>@<cluster-address>/test?retryWrites=true&w=majority'
);
my $db = $client->get_database( 'test' );

The same problem exists in https://cloud.mongodb.com/
Cluster0 => button connect => open Connect to Cluster0
=> connect your application
=> Choose your driver version => Perl => all version
The 'Full driver example' has a mistake

my $client = MongoDB->connect("mongodb+srv://dev-admin:<password>@cluster0-xxxxx.azure.mongodb.net/test?retryWrites=true&w=majority");

Should be written:

my $client = MongoDB->connect('mongodb+srv://dev-admin:<password>@cluster0-xxxxx.azure.mongodb.net/test?retryWrites=true&w=majority');



 Comments   
Comment by Githook User [ 26/Jun/19 ]

Author:

{'name': 'Chris Bush', 'email': 'chris.bush@mongodb.com', 'username': 'cbush'}

Message: DOCS-12826 Fix perl connect to Atlas snippet (#511)

This page inherited a bug from the Atlas console connection snippet.
This uses single quotes in the snippet so as not to interpolate
a variable.
Branch: master
https://github.com/mongodb/docs-ecosystem/commit/161cfb54f36533cd886fbabc55d09d5e67ec5b4e

Comment by Chris Bush [ 26/Jun/19 ]

https://github.com/mongodb/docs-ecosystem/pull/511

Comment by David Golden [ 25/Jun/19 ]

I've filed a cloud support ticket, MMS-6107, for a comparable change in the Atlas UI.

Generated at Thu Feb 08 08:06:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.